How to validate multiple checkboxes in Gridview using Javascript

Last post 01-02-2008 6:11 AM by atsofttech. 2 replies.

Sort Posts:

  • How to validate multiple checkboxes in Gridview using Javascript

    10-30-2007, 3:25 PM
    • Loading...
    • sjanne
    • Joined on 10-25-2007, 9:07 PM
    • Posts 6

    Hi All,

     I have a GridView which is databound and I added two columns which are checkboxes. On a button click I would like to validate the Gridview so that no row should have both the checkboxes checked. i.e Lets say the two checkbox columns are ChkA and ChkB, on the click event of the button which I have outside the Grid, I should fire Javascript that ensures that both ChkA and ChkB is not checked for any record in the GridView. We can ChkA alone checked or ChkB alone checked or none checked but not both for any record in the GridView.

    Anyhelp would be appreciated. Many thanks

     

  • Re: How to validate multiple checkboxes in Gridview using Javascript

    10-30-2007, 4:13 PM
    Answer

    You can either look at the Mutually Exclusive Checkbox control in the Ajax Control Toolkit, or use the correct control for exclusive choices - the radiobuttonlist.

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: How to validate multiple checkboxes in Gridview using Javascript

    01-02-2008, 6:11 AM
    • Loading...
    • atsofttech
    • Joined on 07-16-2005, 3:48 PM
    • India
    • Posts 267
    Everything is possible!
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter