enforce mutual exclusion in text-box of a datagrid control

Discussion in 'ASP .Net Datagrid Control' started by Mark Siffer, Jan 5, 2005.

  1. Mark Siffer

    Mark Siffer Guest

    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>
    </asp:DataGrid>


    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
    Mark Siffer, Jan 5, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giambattista Bloisi

    non-blocking mutual exclusion

    Giambattista Bloisi, Dec 16, 2003, in forum: Java
    Replies:
    1
    Views:
    405
    Matt Humphrey
    Dec 16, 2003
  2. ppp
    Replies:
    1
    Views:
    409
    Patricia Shanahan
    Dec 5, 2006
  3. ppp
    Replies:
    0
    Views:
    346
  4. ppp
    Replies:
    0
    Views:
    334
  5. Replies:
    1
    Views:
    109
    Ben Morrow
    Jun 6, 2006
Loading...

Share This Page