This is a migrated thread and some comments may be shown as answers.

ClientDataKeyNames

5 Answers 959 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 08 Mar 2008, 03:44 AM
When do I need to set a value for ClientDataKeyNames? Should this value generally be set to the same values of DataKeyNames?

5 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 10 Mar 2008, 04:53 PM
Hello Thomas,

You need to set ClientDataKeyNames when you plan to extract values client-side using the getDataKeyValue(colName) method of RadGrid Prometheus:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Keys/DefaultCS.aspx

It is not mandatory to have the same field names defined through the DataKeyNames and ClientDataKeyNames properties of the control (this depends on your custom code logic).

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sameer
Top achievements
Rank 1
answered on 08 Oct 2008, 09:16 AM
 Intellisense is not supporting ClientDataKeyNames as below.
Any means to figure out why? How to identify version mismatch if any?


<
MasterTableView DataKeyNames="ListID" GridLines="None" ClientDataKeyNames="ListID,MailingName">

Thanks.
0
Sebastian
Telerik team
answered on 08 Oct 2008, 09:33 AM
Hello Sameer,

Do you use at least the 2008.1.415 version of RadControls for ASP.NET AJAX (or better yet the latest release 2008.2.1001 of the suite)? The ClientDataKeyNames property should be present there - see this article for more details.

Regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sameer
Top achievements
Rank 1
answered on 08 Oct 2008, 01:18 PM
Thanks for quick reply Stephen.

I have relised the issue.

I was using RadGrid from RadGrid.NET2.dll, I switched to RadGrid from
Telerik.Web.UI and it solved the problem.

Thanks again.
Regards,
0
Cindy Wang
Top achievements
Rank 1
answered on 16 Jun 2010, 10:07 PM
I am using ClientDataKeyName, args.getDataKeyValue("fieldname"); The question is that fieldname is actually an object. Is it possible to get args.getDataKeyValue("fieldname").ID?
Tags
Grid
Asked by
Thomas
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Sameer
Top achievements
Rank 1
Cindy Wang
Top achievements
Rank 1
Share this question
or