Datalist spacing

Discussion in 'ASP .Net' started by tshad, Jun 24, 2005.

  1. tshad

    tshad Guest

    I have a Datalist that will display 4 columns of data.

    I am not using a table format just labels to display a radio button and
    label for the radio button.

    Is there a way to set a size for the lable so that all the radio buttons
    line up on top of each other? Right now they are flush next to each other
    even if there is only 5 characters or 20 characters.

    I have the datalist set as:

    <asp:DataList ID="DataList1" RepeatColumns="4" width="100"
    RepeatDirection="Horizontal" RepeatLayout="Flow" runat="server" >
    <ItemTemplate> <vs:GroupRadioButton id="CvLetters"
    runat="server" OnCheckedChanged="SelectCoverLetter_Click"
    AutoPostBack="True" GroupName="CVRLettersGroup" />
    <asp:label Id="CVLLabel" width="200px" text='<%#
    Container.DataItem("CoverLetterTitle") %>' runat="server"/><asp:label
    Id="CVLIDLabel" visible=false text='<%# Container.DataItem("CoverLetterID")
    %>' runat="server"/>
    </ItemTemplate>
    <HeaderTemplate><br><b><u>CoverLetter(s) assigned to this
    Resume</u></b><br> </HeaderTemplate>
    <footertemplate><br></footertemplate>
    </asp:DataList>

    I tried setting the label width to 200px, but that didn't work. BTW the
    vs:GroupRadioButton is just a radio button.

    Thanks,

    Tom
     
    tshad, Jun 24, 2005
    #1
    1. Advertising

  2. tshad

    tshad Guest

    "tshad" <> wrote in message
    news:...
    >I have a Datalist that will display 4 columns of data.
    >
    > I am not using a table format just labels to display a radio button and
    > label for the radio button.
    >
    > Is there a way to set a size for the lable so that all the radio buttons
    > line up on top of each other? Right now they are flush next to each other
    > even if there is only 5 characters or 20 characters.
    >
    > I have the datalist set as:
    >
    > <asp:DataList ID="DataList1" RepeatColumns="4" width="100"
    > RepeatDirection="Horizontal" RepeatLayout="Flow" runat="server" >
    > <ItemTemplate> <vs:GroupRadioButton id="CvLetters"
    > runat="server" OnCheckedChanged="SelectCoverLetter_Click"
    > AutoPostBack="True" GroupName="CVRLettersGroup" />
    > <asp:label Id="CVLLabel" width="200px" text='<%#
    > Container.DataItem("CoverLetterTitle") %>' runat="server"/><asp:label
    > Id="CVLIDLabel" visible=false text='<%#
    > Container.DataItem("CoverLetterID") %>' runat="server"/>
    > </ItemTemplate>
    > <HeaderTemplate><br><b><u>CoverLetter(s) assigned to this
    > Resume</u></b><br> </HeaderTemplate>
    > <footertemplate><br></footertemplate>
    > </asp:DataList>
    >
    > I tried setting the label width to 200px, but that didn't work. BTW the
    > vs:GroupRadioButton is just a radio button.


    I also setting the ItemStyle-Width, but that didn't seem to do anything:

    ItemStyle-Width="100px"

    Tom
    >
    > Thanks,
    >
    > Tom
    >
     
    tshad, Jun 24, 2005
    #2
    1. Advertising

  3. tshad

    tshad Guest

    "tshad" <> wrote in message
    news:...
    > "tshad" <> wrote in message
    > news:...
    >>I have a Datalist that will display 4 columns of data.
    >>
    >> I am not using a table format just labels to display a radio button and
    >> label for the radio button.
    >>
    >> Is there a way to set a size for the lable so that all the radio buttons
    >> line up on top of each other? Right now they are flush next to each
    >> other even if there is only 5 characters or 20 characters.
    >>
    >> I have the datalist set as:
    >>
    >> <asp:DataList ID="DataList1" RepeatColumns="4" width="100"
    >> RepeatDirection="Horizontal" RepeatLayout="Flow" runat="server" >
    >> <ItemTemplate> <vs:GroupRadioButton id="CvLetters"
    >> runat="server" OnCheckedChanged="SelectCoverLetter_Click"
    >> AutoPostBack="True" GroupName="CVRLettersGroup" />
    >> <asp:label Id="CVLLabel" width="200px" text='<%#
    >> Container.DataItem("CoverLetterTitle") %>' runat="server"/><asp:label
    >> Id="CVLIDLabel" visible=false text='<%#
    >> Container.DataItem("CoverLetterID") %>' runat="server"/>
    >> </ItemTemplate>
    >> <HeaderTemplate><br><b><u>CoverLetter(s) assigned to
    >> this Resume</u></b><br> </HeaderTemplate>
    >> <footertemplate><br></footertemplate>
    >> </asp:DataList>
    >>
    >> I tried setting the label width to 200px, but that didn't work. BTW the
    >> vs:GroupRadioButton is just a radio button.

    >
    > I also setting the ItemStyle-Width, but that didn't seem to do anything:
    >
    > ItemStyle-Width="100px"
    >


    I also tried to use a table in the itemtemplate, but even though I told it
    to repeat horizontal 4 times (which worked in the previous setup), it put
    each table on top of each other instead of 4 across:

    <asp:DataList ID="DataList2" RepeatColumns="4"
    ItemStyle-Width="100px" RepeatDirection="Horizontal" RepeatLayout="Flow"
    runat="server" >
    <ItemTemplate>
    <table width="20px">
    <tr>
    <td>
    <vs:GroupRadioButton id="CvLetters" runat="server"
    OnCheckedChanged="SelectCoverLetter_Click" AutoPostBack="True"
    GroupName="CVRLettersGroup" />
    <asp:label Id="CVLLabel" text='<%#
    Container.DataItem("CoverLetterTitle") %>' runat="server"/><asp:label
    Id="CVLIDLabel" visible=false text='<%# Container.DataItem("CoverLetterID")
    %>' runat="server"/>
    </td>
    </tr>
    </table>
    </ItemTemplate>
    <HeaderTemplate><br><b><u>All Stored Cover
    Letters</u></b></HeaderTemplate>
    </asp:DataList>

    What am I doing wrong here?

    Thanks,

    Tom

    > Tom
    >>
    >> Thanks,
    >>
    >> Tom
    >>

    >
    >
     
    tshad, Jun 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gönen EREN

    Datalist in Datalist How?

    Gönen EREN, Aug 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    Gönen EREN
    Aug 22, 2003
  2. Stephan Bour

    Row spacing in DataList

    Stephan Bour, Dec 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    568
    Stephan Bour
    Dec 8, 2003
  3. Nevyn Twyll
    Replies:
    8
    Views:
    1,939
  4. ree32

    Datalist RepeatLayout Flow spacing problems

    ree32, Oct 29, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    375
    ree32
    Oct 29, 2004
  5. NancyASAP

    Datalist Layout spacing problems, row space

    NancyASAP, Jun 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    255
    NancyASAP
    Jun 8, 2005
Loading...

Share This Page