Page 1 of 1
Radio Buttons in Grid not holding their value
Posted: Wed Sep 10, 2014 3:00 pm
by pshuey@dasinc.com
I have a grid that contains a radio button group with 2 radio buttons (yes/no). I am forcing a selection of one of the two buttons, so I read through the grid and edit each row. When I redisplay the grid I am getting odd results. Any row that had the 'yes' radio button selected now show neither button to be selected, but the bound variable for the group still shows that yes is selected. The no radio button works as expected...if it was selected, it is still selected after I edit the grid. Any ideas?
Re: Radio Buttons in Grid not holding their value
Posted: Thu Sep 11, 2014 5:09 am
by dieter
Hello Patti,
here are some ideas:
Do you work with "long field names"? In this case you have defined an input and an output datastructure for your subfile. Then you have to debug the bound field of the OUTPUT structure before updating the subfile record.
If you don't use long field names you should set a breakpoint directly onto the update sfl statement. Check if the bound field has the correct value at update time. If the value is correct, let the program go on, but let the breakpoint active. Maybe your program runs to the update statement again (and you don't except that).
What values do you use for "selected" and "not selected"? E.g. if you use '1' and ' ' you might have an problem. We had difficulties with blank as a value. Instead you should use 1 and 0 or Y and N.
Please excuse my poor english. I think my ideas are also "poor". But the ideas above were failure situations that we hat in the past.
Best regards from Germany,
Dieter
Re: Radio Buttons in Grid not holding their value
Posted: Thu Sep 11, 2014 10:49 am
by emhill
Patti,
Also make sure you don't have the radio button group field defined somewhere else on the screen. I found out the hard way that it would override the data in my radio button group field if a field with the same name was hanging out somewhere on that screen.
Just a thought...