M
Mark Siffer
Suppose I have a datagrid with two template column
<asp:datagrid id="mydatagrid" runat="server" . . . >
<Columns>
<asp:TemplateColumn>
<asp:EditItemTemplate>
<asp:TextBox id="text1" runat="server/>
</asp:EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<asp:EditItemTemplate>
<asp:TextBox id="text2" runat="server/>
</asp:EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
I want to enforce that one and only one textbox can have a value in it at a
time. So if text1 is populated, then text2 better not be. If text2 is
populated, text1 shouldn't be. Is there a way to do this? I was trying to
use a CustomerValidator but it appears to be privy only of its
ControlToValidate. Any ideas?
Thanks in advance
MS
<asp:datagrid id="mydatagrid" runat="server" . . . >
<Columns>
<asp:TemplateColumn>
<asp:EditItemTemplate>
<asp:TextBox id="text1" runat="server/>
</asp:EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<asp:EditItemTemplate>
<asp:TextBox id="text2" runat="server/>
</asp:EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
I want to enforce that one and only one textbox can have a value in it at a
time. So if text1 is populated, then text2 better not be. If text2 is
populated, text1 shouldn't be. Is there a way to do this? I was trying to
use a CustomerValidator but it appears to be privy only of its
ControlToValidate. Any ideas?
Thanks in advance
MS