Hello Telerik!
We have a page that uses a couple RadButtons as check boxes. A grid row is selected and it fills in controls with data on the page. Other controls work fine but the RadButton will not accept the Boolean value for setting it checked. Once the data is read and then rendered to the controls the RadButton's are always go unchecked to checked.
Here is the control in ASPX
<telerik:RadButton runat="server" ID="RadButtonIsFemale" Text="Female?" ButtonType="ToggleButton" AutoPostBack="false" ToggleType="CheckBox"></telerik:RadButton>
And the RadGrid calls a Javascript function RowSelected that updates the controls with grid data.
function RowSelected(sender, args) {
var myRadGrid = sender;
var myMasterTable = myRadGrid.get_masterTableView();
var myName = myMasterTable.get_selectedItems()[0].getDataKeyValue('Name');
$find("<%= RadTextBoxName.ClientID %>").set_value(myName);
...
...
...
var myIsFemale = myMasterTable.get_selectedItems()[0].getDataKeyValue('IsFemale');
$find("<%= RadButtonIsFemale.ClientID %>").set_checked(myIsFemale);
}
The bold line above always just sets it to True - I have validated the data, so False and True values are definitely set to 'IsFemale', but it doesn't toggle the check. Is there a different property that needs to be set?
Thanks!
SDI
We have a page that uses a couple RadButtons as check boxes. A grid row is selected and it fills in controls with data on the page. Other controls work fine but the RadButton will not accept the Boolean value for setting it checked. Once the data is read and then rendered to the controls the RadButton's are always go unchecked to checked.
Here is the control in ASPX
<telerik:RadButton runat="server" ID="RadButtonIsFemale" Text="Female?" ButtonType="ToggleButton" AutoPostBack="false" ToggleType="CheckBox"></telerik:RadButton>
And the RadGrid calls a Javascript function RowSelected that updates the controls with grid data.
function RowSelected(sender, args) {
var myRadGrid = sender;
var myMasterTable = myRadGrid.get_masterTableView();
var myName = myMasterTable.get_selectedItems()[0].getDataKeyValue('Name');
$find("<%= RadTextBoxName.ClientID %>").set_value(myName);
...
...
...
var myIsFemale = myMasterTable.get_selectedItems()[0].getDataKeyValue('IsFemale');
$find("<%= RadButtonIsFemale.ClientID %>").set_checked(myIsFemale);
}
The bold line above always just sets it to True - I have validated the data, so False and True values are definitely set to 'IsFemale', but it doesn't toggle the check. Is there a different property that needs to be set?
Thanks!
SDI