I'm trying to set up two check box's in a DataGrid so that only one can be checked at any one time.
At the moment, the following renders the existing state of the choice on screen:
<asp:TemplateColumn HeaderText="Choice One">
<ItemTemplate>
<asp:CheckBox ID="CheckBoxChoiceOne"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ChoiceOne") %>'
runat="server">
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Choice Two">
<ItemTemplate>
<asp:CheckBox ID="CheckBoxChoiceTwo"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ChoiceTwo") %>'
runat="server">
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
How do I go about ensuring that if the user chooses ChoiceOne that any selection of ChoiceTwo will be unselected and vice versa? Is there any way to state in the DataGrid control that these two checkboxes are grouped together?