none
Checkbox in gridview

    Question

  • I have added checkboxes to my gridview when the page loads. When I select a checkbox I want the others checked option to be set to false. Therefore only allowing one checkbox to be selected at a time. How would I do this?

    Here is the page load method I have added so checkboxes are added to each row in my gridview

      foreach (GridViewRow objRow in GridView1.Rows) 
                { 
                    TableCell tcCheckCell = new TableCell(); 
                    CheckBox optionCheckBox = new CheckBox(); 
                    tcCheckCell.Controls.Add(optionCheckBox); 
                    objRow.Cells.Add(tcCheckCell); 
                } 

    Wednesday, June 13, 2012 9:28 AM

Answers

All replies