Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RadioButton grouping in VirtualTree

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
amsimmon



Joined: 31 Mar 2006
Posts: 13

PostPosted: Wed Jul 19, 2006 4:02 pm    Post subject: RadioButton grouping in VirtualTree Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jul 19, 2006 10:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group