Re: RadioButton in a DataGrid
From: Tusnuy (tusnuy@hotmail.com)
Date: 09/27/02
- Next message: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Previous message: news.microsoft.com: "Re: RadioButton in a DataGrid"
- In reply to: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Next in thread: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Reply: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Tusnuy" <tusnuy@hotmail.com> Date: Fri, 27 Sep 2002 14:50:14 -0700
http://www.metabuilders.com/Tools/RowSelectorColumn.aspx
:o) It speaks for itself.
"news.microsoft.com" <Saurabh@gtx.com> wrote in message news:e$h7W5mZCHA.2292@tkmsftngp12...
I have also tried emiiting the <input> tag exactly the ASP.NET emits a server radio button as. And now clicking the radio button does post back to the server, BUT, it does not activate the "CheckedChanged" event, which is quite obvious . But then what is the workaround if I want to raise that event too ?
Saurabh
"news.microsoft.com" <Saurabh@gtx.com> wrote in message news:udaVLFkZCHA.1860@tkmsftngp12...
Thanks Bipin.
But i also want to handle events on radio button like "CheckedChanged" [in radiobutton server control]. Basically I need to perform some task ON SERVER side when someone selects a radio button.
How can I do that if I emit <input> tags ?
"Bipin [MVP]" <bipinjoshi@hotmail.com> wrote in message news:ebUJilcZCHA.3808@tkmsftngp08...
> Hi,
> This is a known thing. DataGrid acts as a naming container for its child
> controls and hence changes the name etc. In order to overcome this what you
> can emit <INPUT> tags userself in some event like Item_Created or
> Item_Databound and not use the <asp:RadioButton>.
>
> --
> Regards,
> Bipin Joshi
> Microsoft MVP | Developer | Author
> Looking for .NET information?
> Must visit www.DotNetBips.com for
> articles, tutorials, demos and more...
> --
> "news.microsoft.com" <Saurabh@gtx.com> wrote in message
> news:ucHZPhbZCHA.2532@tkmsftngp12...
> > Hi
> >
> > I have been trying to put a radiobutton server control inside a datagrid .
> > but the radio buttons being generated on the webform are not mutually
> > exclusive.
> > here is the code:
> >
> >
> > <asp:datagrid id="datagridVendor" runat="server" Width="460px"
> Height="25px"
> > AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True">
> > <Columns>
> > <asp:TemplateColumn SortExpression="VendorName" HeaderText="Vendor
> > Name">
> > <ItemTemplate>
> > <asp:RadioButton id="rb" Enabled=True Runat=server
> > GroupName="Grp1" ></asp:RadioButton>
> > </ItemTemplate>
> > </asp:TemplateColumn>
> > </Columns>
> > </asp:datagrid>
> >
> > Now the reason why they are not mutaully exclusive at run time is that
> > ASP.NET changes the IDs of these radio buttons. Here is what i see when I
> do
> > a "View Source" in the browser.
> >
> > <input id="datagridVendor__ctl2_rb" type="radio"
> > name="datagridVendor:_ctl2:Grp1" value="rb" />
> > <input id="datagridVendor__ctl3_rb" type="radio"
> > name="datagridVendor:_ctl3:Grp1" value="rb" />
> >
> > Any idea why is this happening ???????
> >
> > Thanks in advance.
> >
> > Saurabh
> >
> >
> >
> >
>
>
- Next message: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Previous message: news.microsoft.com: "Re: RadioButton in a DataGrid"
- In reply to: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Next in thread: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Reply: news.microsoft.com: "Re: RadioButton in a DataGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]