StrataFrame Forum

DevExpress RadioGroup not Binding

http://forum.strataframe.net/Topic1720.aspx

By Andria Jensen - 7/4/2006

I'm sure I'm missing something small here, but the behavior of the Inherited RadioGroup control from DevEx is not binding to my BO like i expected it would.  I have placed several on my form with a grid and several other controls which bind to the BO.  As I select a row in the grid, I want my controls to populate.  This is working perfectly for everything except the radiogroup controls, so it is specific to this type of control.  I have my BindingField and BO set correctly.  If I set the BindingProperty to SelectedIndex, it populates and changes like I want it to.  However, when I edit that record and change the radio group selection it doesn't keep the change.  It lets me select a different radio button, but when I click out of the radio group it reverts to the original value from the BO.  I changed BindingUpdateMode to Never and it took this behavior away, but I want it to update the BO when I make a change.  So what am I missing? 
By Trent L. Taylor - 7/4/2006

I will take a look at it.  Thanks.
By Trent L. Taylor - 7/5/2006

Andria,

I created a sample project and the binding appeared to work just fine.  I have attached the sample application I created to test the control so you can see how I am binding to the radio group.  Please let me know if there is something I am missing on how you are attempting to interact with the control.  Thanks.

By Andria Jensen - 7/5/2006

Yep, yours worked...so I figured it had to be something to do with mine.  After looking over it some more I realized that the fields I was binding the radio groups to were all customized as Enum types.  I cleared the customization and that fixed the problem.  Not sure why this would make a difference, but it works now so I guess it's fine.  Thanks for the help!
By Trent L. Taylor - 7/5/2006

Andria,

That makes sense.  The radio group is trying to bind to the enum value instead of an integer.  What you may want to do, so you can keep your customization, is create a custom property that returns the integer value which you use to bind to the radio and leave the original property alone with the customization.  This way you can have the best of both worlds.