
Pascal Vitoux
Top achievements
Rank 1
Pascal Vitoux
asked on 09 Jul 2008, 10:00 AM
With older RadGrid component, I used to modify the content of a cell on client-side by this way:
How could I do the same with RadGrid Q1 2008 ?
I found how to get the value, by using getDataKeyValue("myKey") method, but I can't assigned a value using this method
rowObject.KeyValues["myKey"] = "myValue" |
How could I do the same with RadGrid Q1 2008 ?
I found how to get the value, by using getDataKeyValue("myKey") method, but I can't assigned a value using this method
4 Answers, 1 is accepted
0
Hello Pascal,
You can use getCellByColumnUniqueName() method. Please check this article:
http://www.telerik.com/help/aspnet-ajax/grid_getcellbycolumnuniquename.html
Regards,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can use getCellByColumnUniqueName() method. Please check this article:
http://www.telerik.com/help/aspnet-ajax/grid_getcellbycolumnuniquename.html
Regards,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Princy
Top achievements
Rank 2
answered on 09 Jul 2008, 11:19 AM
Hi Pascal,
You can also refer the following help document link.
Extracting key values client-side
Thanks
Princy.
You can also refer the following help document link.
Extracting key values client-side
Thanks
Princy.
0

Pascal Vitoux
Top achievements
Rank 1
answered on 09 Jul 2008, 12:19 PM
Well these examples do not really reply to my question ...
These examples show how to get a cell value.
And I know how to do this, using the getDataKeyValue("myKey") method inside a OnRowSelected client-side event.
My question is : I want to assign a new value to a given cell, from a selected row.
So, inside the OnRowSelected client-side event, I want to do eventArgs.getDataKeyValue("myKey") = "myValue" - Assuming eventArgs are parameters from the OnRowSelected client-side event.
But, if I try to do this, I got the following JS error :
"Microsoft JScript runtime error: Cannot assign to a function result"
So how can I assigned my value ?
These examples show how to get a cell value.
And I know how to do this, using the getDataKeyValue("myKey") method inside a OnRowSelected client-side event.
My question is : I want to assign a new value to a given cell, from a selected row.
So, inside the OnRowSelected client-side event, I want to do eventArgs.getDataKeyValue("myKey") = "myValue" - Assuming eventArgs are parameters from the OnRowSelected client-side event.
But, if I try to do this, I got the following JS error :
"Microsoft JScript runtime error: Cannot assign to a function result"
So how can I assigned my value ?
0
Hello Pascal,
You can set desired value like this:
masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[0], "ContactName").innerHTML = "myvalue";
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can set desired value like this:
masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[0], "ContactName").innerHTML = "myvalue";
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center