Monday, August 16, 2010

How to save state of radiobutton list inside datagrid?

ive been banging my head to the wall.. i need to find a way to save the state of radio button or dropdownlist after postback.





i can get the value os the selected item but its seems like the dropdownbutton in the datagrid is ignoring it.


after post back the dropdownlist return to the original state (which is the first value is selected)





PLEASE HELP!!!





the dataset is stores into a session variable


dataset instance is declared in every function.





HELP!!!How to save state of radiobutton list inside datagrid?
$_session['radio'] = 0; // unchecked value


$_session['radio'] = 1; // checked value





%26lt;input type=';radio'; %26lt;?php if ($_session['radio'] == 1) echo 'checked'; ?%26gt; %26gt;How to save state of radiobutton list inside datagrid?
Is this a radio button group? For example, how old are you


o 10 - 19


o 20 - 29


o 30 - 39


o 40+





In this example, I would have a button group, because the user cannot select more than one option.





When buttons are in groups, the individual state of each button is unnecessary to know. Calling the value of the radio button group will just return the value of the button selected.

No comments:

Post a Comment