At a guess since I can't see the entire form, I'd bet radio
button/datagrid isn't autoposting.
John Warner
> -----Original Message-----
> From: Alan Snyder [mailto:alans nufrontiers.com]
> Sent: Wednesday, March 28, 2007 5:40 PM
> To: aspnet aspadvice.com
> Subject: [aspnet] radioButton within an ItemTemplate
question
>
>
> Hello All,
>
> I have a datagrid that contains an ItemTemplate, which
contains a
> radioButton:
>
> <asp:templateColumn
> HeaderText="On Clock"
> ItemStyle-horizontalAlign="center"
> ItemStyle-width="60px">
>
> <itemtemplate>
>
> <asp:radioButton
> checked=<%#
container.dataItem("on_clock")%>
> CommandName="rbOn_clock"
> runat=server/>
>
> </itemTemplate>
>
> </asp:templateColumn>
>
>
> What I want to do is fire an onItemCommand event when
any of
> the radio buttons is checked.
>
> Within the datagrid I've got:
>
> onItemCommand="dg_ItemCommand"
>
> Here's my dg_ItemCommand:
>
> '------------handle the on_clock click
updates---------
>
> sub dg_itemCommand(o as Object, e as
DataGridCommandEventArgs)
>
> if e.CommandName = "rbOn_clock" then
>
> 'do something, for now just redirect to time.com
>
> response.redirect("http://www.time.com"
a>)
>
> end if
>
> end sub
>
>
> When I click on any radiobutton, nothing happens, the
> dg_itemCommand doesn't fire.
>
> Any idea's?
>
> Thanks for the insight,
>
> Alan
>
>
>
>
> Alan Snyder
> CTO - Technology
> office: 847.227.8669
> cell: 847.809.0514
> alans nufrontiers.com
> Nu Frontiers Enterprises, Inc.
> 344 Comstock Dr.
> Elgin, IL 60123
> "Top Solutions for Top Producers"
--- List Settings ---
http://aspadvice.com/list
s/
|