In our application we have a Radgrid that contains several GridBoundColumns and a few GridCheckBoxColumns. Here is the code that defines 2 of them:
<telerik:GridBoundColumn
UniqueName="gbcWBSNumber"
DataField="WBSNumber"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
HeaderText="WBS #">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn
UniqueName="gccAllowBoes"
DataField="AllowBoes"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
HeaderText="Allow<br />BOEs">
</telerik:GridCheckBoxColumn>
We need a way to adjust the settings of these two objects using JavaScript. We are doing this successfully for the GridBoundColumn but not for the GridCheckBoxColumn.
In the following (greatly abbreviated) JavaScript we are able to obtain a reference to both objects(stored in the global variables WBSNumber and AllowBOEs respectively):
function WBSGridDoubleClick(sender, eventArgs)
{
(code removed…)
WBSNumber = MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[index], "gbcWBSNumber");
AllowBOES = MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[index], "gccAllowBOEs");
(code removed…)
}
After some other processing we acquire new values that we need to use to reset these two objects.
We have the following JavaScript code in our program to hopefully accomplish this:
function OnClientCloseWBSEast(oWnd)
{
// call a webservice to retrieve the modified data
WBSData.GetThisWBS(keyValues, OnGetThisWBSComplete);
}
// dt is actually an array of strings that contains the
// information we need
function OnGetThisWBSComplete(dt)
{
WBSNumber.innerText = dt[0]; // works fine!!!
AllowBOES.innertext = dt[4] // returns ‘true’ or ‘false’
}
Unfortunately, even though the value returned from the webservice in dt[4] reflects the latest change by the user, the ‘innerText’ property causes the checkbox to be removed and the value ‘true’ or ‘false’ to appear in the cell.
We have also tried innerHTML, value, and checked as properties for our CheckBox object but none of these work any better.
Can someone tell us what the proper syntax would be?
Thanks.