Murray Brown
asked on
ASP.net drop down list inside GridView
Hi. I have the following GridView with radio buttons in
I need to replace these with drop down lists. Each drop down list needs to
contain four options: 1, 2, 3 and 4
<asp:GridView ID="GridView2" runat="server"
font-names="Century Gothic" forecolor="White" style="margin-top: 0px">
<Columns>
<asp:TemplateField ControlStyle-Font-Bold="fa lse"
ControlStyle-Font-Size="Sm aller" ControlStyle-Forecolor="Da rkRed"
HeaderStyle-Font-Size="Sma ll" HeaderText="" HeaderStyle-Width="80">
<ItemTemplate>
<asp:RadioButton ID="Button6" runat="server"
CommandName="MyButton1"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="A" Width="80" />
<asp:RadioButton ID="Button7" runat="server"
CommandName="MyButton2"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="B" Width="80" />
<asp:RadioButton ID="Button8" runat="server"
CommandName="MyButton3"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="C" Width="80" />
<asp:RadioButton ID="Button9" runat="server"
CommandName="MyButton4"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="D" Width="80" />
</ItemTemplate>
I need to replace these with drop down lists. Each drop down list needs to
contain four options: 1, 2, 3 and 4
<asp:GridView ID="GridView2" runat="server"
font-names="Century Gothic" forecolor="White" style="margin-top: 0px">
<Columns>
<asp:TemplateField ControlStyle-Font-Bold="fa
ControlStyle-Font-Size="Sm
HeaderStyle-Font-Size="Sma
<ItemTemplate>
<asp:RadioButton ID="Button6" runat="server"
CommandName="MyButton1"
CommandArgument="<%# CType(Container,GridViewRo
Text="A" Width="80" />
<asp:RadioButton ID="Button7" runat="server"
CommandName="MyButton2"
CommandArgument="<%# CType(Container,GridViewRo
Text="B" Width="80" />
<asp:RadioButton ID="Button8" runat="server"
CommandName="MyButton3"
CommandArgument="<%# CType(Container,GridViewRo
Text="C" Width="80" />
<asp:RadioButton ID="Button9" runat="server"
CommandName="MyButton4"
CommandArgument="<%# CType(Container,GridViewRo
Text="D" Width="80" />
</ItemTemplate>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER