View previous topic :: View next topic |
Author |
Message |
amsimmon
Joined: 31 Mar 2006 Posts: 13
|
Posted: Wed Jul 19, 2006 4:02 pm Post subject: RadioButton grouping in VirtualTree |
|
|
I have an IsDefault field on the lowest level nodes of my tree that I'd like to use radio buttons to set. I set a RadioButton as the editor on that RowBinding and it displays correctly. My problem is they are grouped across the whole tree so if I select one radio button it deselects all other radio buttons across the whole tree.
I need each group of siblings under a parent to have it's own default so I need the radio buttons to be grouped per parent.
Is it possible to group sibling RadioButton controls separately from other nodes in the VirtualTree? If so, how would I do that?
Thanks in advance for your assistance. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jul 19, 2006 10:55 pm Post subject: |
|
|
Because each of the radio controls is parented by the same control (Virtual Tree) RadioButton.AutoCheck = true will cause the behaviour you describe. If you set AutoCheck to false then checking/unchecking one node will not affect another - but you have to handle the unchecking of other nodes in the group yourself.
The best way to do this is to set the ValueProperty of the CellEditor to the RadioButton.Checked property. Then you simply change the underlying property in your data and enforce the single selected value per group behaviour at the data level. _________________ Infralution Support |
|
Back to top |
|
|
|