0

I have a certain requirement that, if the first checkbox in a row of checkboxes is unchecked, then all the other checkboxes must be unchecked. Here is a sample UI

I am using DevExpress 21.2.3 and RepositoryItemCheckEdit as the check box

Can anyone help me to achieve this functionality?

Thanks

roby
  • 1

2 Answers2

0

Create a list of check boxes. Then If checkBox1 is equal to false(unchecked), set the check boxes in list to false.

if( checkBox1.Checked== false ) 
{
  for(int i = 0; i <= checkBoxes.Count; i++) 
  {
    checkBoxes[i].Checked = false;
  }
}
sjuhyeon
  • 1
  • 1
0

you can do it simply like this:

  • firstly, create a few checkboxes in your program: enter image description here

  • secondly, declare a CheckBox array in the class and, in the Load() method, initialize all checkboxes to created CheckBox array: enter image description here

  • finally, in the CheckedChanged() method, write code which will check or uncheck all checkboxes, depending on the first checkbox. enter image description here

GingerCRO
  • 26
  • 4