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

Client Databinding - How do you work with datakeys?

5 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin Castle
Top achievements
Rank 1
Kevin Castle asked on 04 Dec 2008, 10:36 PM
We are binging a grid using client-side databinding (Note : we are not using declarative client side databinding), and we want to store certain values using the grids datakeys. Is this possible? Can you give us a small snippet as to how this might be done.

Also, can I recommend more client-side databinding examples on the samples site. It would help out alot.

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Dec 2008, 05:24 AM
Hi Kevin,

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

ASPX:
 <MasterTableView AutoGenerateColumns="true"  ClientDataKeyNames="ProductID"  > 

Keys/Values client-side

Shinu
0
Kevin Castle
Top achievements
Rank 1
answered on 05 Dec 2008, 04:46 PM
"We are binging a grid using client-side databinding (Note : we are not using declarative client side databinding), and we want to store certain values using the grids datakeys. Is this possible? Can you give us a small snippet as to how this might be done."

One thing that I see common in the forums is that the telerik guys will respond right away, without fully reading your customer's post. We are using CLIENT SIDE DATABINDING - the example that you sent was using server side databinding? Can you please re-read the post and respond, if the answer is "you cannot use datakeys when using client side databinding, then I need to know".

Kevin.
0
Vlad
Telerik team
answered on 08 Dec 2008, 07:10 AM
Hi,

ClientDataKeyNames will work with client data-binding as well.

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin Castle
Top achievements
Rank 1
answered on 08 Dec 2008, 06:00 PM
We are getting an exception when setting the datakey in the markup, and are doing client side databinding.
We have the latest version of the controls too. You guys really should make more demos for client side databinding, i think you would find the errors before we have to post them on the forums.

If you can shed some light on this error that would be great.
0
Sebastian
Telerik team
answered on 09 Dec 2008, 08:40 AM
Hello Kevin,

Thank you for the feedback - we will consider adding more examples concerning the client-side binding feature of our web grid for the future versions of the product.

Regarding the error in question:
I assume that you assign and extract the key values on the client using the approach presented here - can you please confirm that? I will also appreciate if you share with us the stack trace/message of the exception you receive as well as your actual grid implementation. Thus we will do our best to research the matter and provide up-to-the-point answer/fix.


Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Kevin Castle
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kevin Castle
Top achievements
Rank 1
Vlad
Telerik team
Sebastian
Telerik team
Share this question
or