Hi,
I'm converting a Radgrid to a TreeList (user wants to be able to expand/collapse) and I just discovered that the TreeList doesn't use the DataKeyNames the same way the RadGrid does. (I want to access some properties that are part of the query, but not shown in the TreeList).
I also discovered that the ClientDataKeyNames does work, so now I'm faced with converting some server-side code to client-side code.
But I can't get it to work.
On server-side I had this in the ItemDataBound event: (this was for the RadGrid)
I've been trying to convert this to client-side code using the ItemCreated event:
but this gives me an error message:
How can I do this client side?
Cheers,
CJ
I'm converting a Radgrid to a TreeList (user wants to be able to expand/collapse) and I just discovered that the TreeList doesn't use the DataKeyNames the same way the RadGrid does. (I want to access some properties that are part of the query, but not shown in the TreeList).
I also discovered that the ClientDataKeyNames does work, so now I'm faced with converting some server-side code to client-side code.
But I can't get it to work.
On server-side I had this in the ItemDataBound event: (this was for the RadGrid)
If
(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)(
"OPLEIDING_GEBIED_NIVEAU"
) > 0)
Then
CType
(dataBoundItem.FindControl(
"chkIsBeroepsdeel"
), CheckBox).Visible =
False
End
If
I've been trying to convert this to client-side code using the ItemCreated event:
function
ItemCreated(sender, eventArgs) {
var
item = eventArgs.get_item();
if
(item.get_dataKeyValue(
"OPLEIDING_GEBIED_NIVEAU"
) > 0) {
item.findControl(
"chkDoorrekenen"
).style.display =
'none'
;
}
}
JavaScript runtime error: Object doesn't support property or method 'findControl'
How can I do this client side?
Cheers,
CJ