May I know how do I manipulate the ClientDataKeyNames from code behind?
I tried to search the documentation but can't seem to find any issue about this.
My default grid only contains 3 column hence I declared 3 clientdatakeynames in the design mode.
However this grid can be used to display another additional data which requires the 4th column hence I need to add the additional clientdatakeynames into the grid so I can extract it out via javascript.
Do you know how can I achieve this?
Thanks.
0
Rosen
Telerik team
answered on 04 Feb 2010, 09:07 AM
Hi AereoN,
As pointed in the documentation my colleague have referred to, the ClientDataKeyNames is an string array which holds the names of the fields which values should be serialized to the client. As with any other property, you may change it value dynamically during the execution of the control by assigning a new array instance with the appropriate values. However you should have in mind that a rebind may be needed if the new name is added after the grid is populated. Also the ClientDataKeyNames values are not stored into the ViewState thus you should re-create the collection on every postback.
Sincerely yours,
Rosen
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.