Here is a grid I used it in. Pay attentino to the
<%# !resolveBoolean(DataBinder.Eval(Container.DataItem ,"Coming").ToString())%>
In the code behind you set the data src as normal and call the
databind as normal. However this stmt in the aspx will cause a late
binding allowing you to do things like examine the data and make
decisions on it before it is displayed.
Thanks,
Brette
<asp:datagrid id="GrdRSVP" runat="server" BorderColor="#F14700"
BackColor="#F14700" BorderStyle="None"
CellPadding="2" Width="536px" AutoGenerateColumns="False"
ForeColor="#F14700" Font-Names="Century Gothic"
GridLines="Horizontal" Font-Size="Smaller"
HorizontalAlign="Left">
<FooterStyle Font-Size="Small" Font-Names="Century Gothic"
ForeColor="#F29412" BackColor="#F29412"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<AlternatingItemStyle
BorderColor="#C04000"></AlternatingItemStyle>
<ItemStyle Font-Size="X-Small" Font-Names="Century Gothic"
HorizontalAlign="Left" ForeColor="Cornsilk"
VerticalAlign="Middle" BackColor="#F14700"></ItemStyle>
<HeaderStyle Font-Size="Small" Font-Names="Century Gothic"
Font-Bold="True" HorizontalAlign="Left"
ForeColor="Cornsilk" VerticalAlign="Middle"
BackColor="#F29412"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="FirstName" HeaderText="First
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="LastName" HeaderText="Last
Name"></asp:BoundColumn>
<asp:BoundColumn Visible="False"
DataField="GuestId"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Yes/No">
<ItemTemplate>
<asp:RadioButton id=RadioYes runat="server"
GroupName="radio" Checked='<%#
resolveBoolean(DataBinder.Eval(Container.DataItem, "Coming").ToString())%>'>
</asp:RadioButton>
<asp:RadioButton id=RadioNo runat="server"
GroupName="radio" Checked='<%#
!resolveBoolean(DataBinder.Eval(Container.DataItem ,"Coming").ToString())%>'>
</asp:RadioButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC"></PagerStyle>
</asp:datagrid>
"Random" <ci*******@hotmail.com> wrote in message news:<OO**************@TK2MSFTNGP12.phx.gbl>...
Thank you. This sounds great. If you could post any examples on the late
binding to other controls, I would be very thankful.
"Bliss" <bg***********@landolakes.com> wrote in message
news:61**************************@posting.google.c om...I would use a DataGrid with Template col, this will allow you to do
what you need. You can use the Web control radio buttons within the
template colums and then you can late bind if they should be selected
or not. I just did this from a DB it was not to bad once I figured out
how it all works. I am pretty new to .NET so I am not sure this is the
best way but it is how I did it.
B
"Random" <ci*******@hotmail.com> wrote in message
news:<Os**************@TK2MSFTNGP12.phx.gbl>... I need to generate a list of radio buttons, from either a database or an
XML
file (I'd prefer to go the XL route). Now, for each item in my
database/XMl
file, I have a foreign key to data that I will access through a Web
Service
I've created. I would like to take the data that is returned and
populate a
combo box next to the radio button (if applicable).
Is it possible to use the existing .NET controls (RadioButtonList,
DropDownList, Repeater) to give me this functionality, or do I need to
program all this in the Page_Load. I know I could do it in 10 minutes in
classic ASP, but I'm really trying to do this the "right" way for .NET.
Any
suggestions would be greatly appreciated.