Is it possible to change order of checkbox states?
Now states are ordered indeterminate, unchecked, checked.
But when I initialize form with null for checkbox variables, so checkboxes are in indeterminate state.
First state after click such checkbox would be checked.
4 Answers, 1 is accepted
I am afraid this scenario could not be achieved. The flow of the RadCheckBox state is as follow Indeterminate, Unchecked, Checked. If you do not need indeterminate state you could disable it when set IsThreeState = "False". In this way the you won't be able to enter Indeterminate state through the UI, so the fist state of the checkbox will be Unchecked and the next state - Checked.
I hope this will help.
In my scenario I use ThreeStates for checkbox.
The main problem is that, when user load form, all of checkboxes are in indeterminate state, as not set.
Then user set fields, ON or OFF, but in most scenarios users set ON (Checked), so user must tap two times in checkbox in order to set Checked state. I must maintain indeterminate state for required field validation.
If it will be possibility to change order of states, to [Indeterminate, Checked, Unchecked] users could save their time during fillup form.
I understand the requirements you have. I have further reviewed the code and by default the CheckBox IsChecked state flow is indeterminate, unchecked, checked. I have found a way how this can be changed inside the IsCheckedChanged method. Mainly you need a flag that will track when the state is changed and change the value of the property bind to the CheckBox IsChecked property.
I have attached a sample how this could be achieved. Download it and give it a try.
I hope I was helpful.