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

Grid Local Data Updated

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 24 May 2013, 10:34 AM
Hi!

So, I have a Grid on my project like this:

<iframe width="100%" height="300" src="http://jsfiddle.net/JnP8M/32/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

I want to update the MyGlobalVars.GridData locally.
I can see that when the user clicks "save changes", an array of the changed data gets passed to the function.
If I want to update MyGlobalVars.GridData am I supposed to do it manually? Or is there some kind of way to sync it?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 27 May 2013, 03:12 PM
Hi Andre,

After the widget is initialized, it is not bound to the original JavaScript data array anymore. In other words any changes made in the Grid data will not be automatically synched with the MyGlobalVars.GridData array. If you would like to update the array please do that manually in the corresponding transport method.

As an alternative approach I suggest you to take the whole data set (data method), transform it into standard JavaScript object (toJSON method) and assign it to the GridData variable.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Andre
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or