put this in your item databound event handler
[snip]
else if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
System.Text.StringBuilder resource = new System.Text.StringBuilder(256);
Label lbl = (Label)e.Item.FindControl("Dig");
if(lbl != null)
{
resource.Append(e.Item.Cells[1].Text.Trim());
lbl.Text = "<input type=radio name='samegroup' value='" + resource.ToString() + "'>";
}
else
throw new OutOfMemoryException("Out of memory");
add a template column to your datagrid and label it Dig either in the designer or in the html page
<Columns>
<asp:TemplateColumn HeaderText="Dig">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:Label id="Dig" runat="server">Dig</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
--
Regards,
Alvin Bruney
[ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here...
http://tinyurl.com/27cok
Hi Alvin,
I am unable to find it in the newsgroup. Can you please post the code once again.
Thanks in advance.
Regards,
Sriram Mallajyosula
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message search this newsgroup i posted the complete source code for this a couple weeks ago.
--
Regards,
Alvin Bruney
[ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here...
http://tinyurl.com/27cok
Hi All,
I am adding a radiobutton in a datagrid. Now if I want to select a single radio button I am unable to achieve this. I have tried both RadioButton and HtmlInputRadioButton. Is there any way out.
Thanks in advance.
Regards,
Sriram Mallajyosula