Datalist spacing

T

tshad

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
 
T

tshad

tshad said:
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
 
T

tshad

tshad said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top