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

[Solved] Accessing DataKeys client-side from PopUp form

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 02 Sep 2010, 08:49 PM
I'm having trouble accessing my data keys from a PopUp form in the new release.  I have some cleint-side logic that runs from a textbox in the edit form that needs to get at my object's id.  Previously I would be able to use jQuery to get the grid and the form and make a call to grid.dataItem($form.data('tr')) to get the underlying object and get at the property values.  But when I run the same function now it returns 'undefined'.  I took a look at the grid.editing javascript to try to figure out the problem, and I believe that a change was made in the logic to call $popup.data('tr', $tr) just before the call to updateRow.  If I understand this correctly, then the row data is only set on the form just before the form updates back to the data store.  I was able to get around this for now by tying in to the onEdit event and storing the data myself.  But is there another way to get at the underlying data object or data keys for a PopUp form while it is being edited?  Would it be possible to have the grid logic set the 'tr' value when the popup is created?

Thanks in advance for your help.

Regards,
Brian

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 03 Sep 2010, 07:25 AM
Hi Brian Roth,

I suggest you check the OnEdit client-side event. It will give you access to the data item and the form without the need of the old code.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or