http://www.codeproject.com/cs/miscctrl/

解决方案 »

  1.   

    没这么用过,要是我的话,在有多个选项时,我就换用DropDownList控件了。
      

  2.   

    如果是在编辑的时候显示RadioButtonList,在html里这样写
    <asp:TemplateColumn HeaderText = "性别">
    <ItemStyle Width="15%"></ItemStyle>
    <ItemTemplate>
    <asp:Label Runat=server ID="labSex" Text='<%# DataBinder.Eval(Container.DataItem,"HMNSEX")%>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:RadioButtonList ID="rdlSex" Runat="server">
    <asp:ListItem>男</asp:ListItem>
    <asp:ListItem>女</asp:ListItem>
    </asp:RadioButtonList>
    </EditItemTemplate>
    </asp:TemplateColumn>如果是page_load的时候就显示,这样写
    <asp:TemplateColumn HeaderText = "性别">
    <ItemStyle Width="15%"></ItemStyle>
    <ItemTemplate>
    <asp:RadioButtonList ID="rdlSex" Runat="server">
    <asp:ListItem>男</asp:ListItem>
    <asp:ListItem>女</asp:ListItem>
    </asp:RadioButtonList> </ItemTemplate>
    </asp:TemplateColumn>如果要求RadioButtonList中选中的项由数据库中的数据决定,可以用一个循环来重新绑定
      

  3.   

    web...我的意思是各个选项分别位于不同列,而不是在同一个cell里
      

  4.   

    这个radio不和数据库关联。怎么动态的加?