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

[Solved] InCell edit of details in master edit form

3 Answers 37 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.
Jaap
Top achievements
Rank 2
Jaap asked on 29 Nov 2011, 04:18 PM
Hello,

I have a master entity with details (e.g. Order with OrderLines) which I want to edit in one screen.
I am displaying it in a Window as you can see in the attached image.
I want to have InCell edit for the grid, but that seems only to work when using Ajax databinding and enabling the SubmitChanges in the toolbar. I want just simple Server databinding and I don't want the Save Changes and Cancel Changes buttons (and also not the refresh button in the footer).
When I click my own Save button, then I want to post the whole order with orderlines to my controller.
How should I do that?

Thanks in advance,
Jaap

3 Answers, 1 is accepted

Sort by
0
Jaap
Top achievements
Rank 2
answered on 30 Nov 2011, 11:38 AM
I did some more research.
What I want is comparable with the NestedGrid example attached to Grid inside a grid's popup. But in this example every edit of a row in the grid on the edit form is directly saved to the controller.
What I want is using the InCell edit mode, so I can edit multiple records and send them in one request with the data of the master to the controller. I can do this by taking the form controls and create an javascript object of them and add the dataItems of the grid as an array to that object. And then I can send it to the controller as JSON. I can get that to work.

But the problem is that the grid.dataItem() method returns only the original data (even if I delete a record).
How can I get the actual dataItems of the grid (unmodified, changed or added)?
0
Daniel
Telerik team
answered on 02 Dec 2011, 08:46 AM
Hello Jaap,

You could use the Grid`s client side changeLog property. It contains properties for the updated,deleted and inserted items when using InCell editing.
I attached a project which shows exactly how to get them. I hope it helps.


Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Jaap
Top achievements
Rank 2
answered on 02 Dec 2011, 08:51 AM
Ok, will give it a try.
Seems the documentation is not up to date on http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api-and-events.html#ClientProperties else I whould have seen it, I think.

Jaap
Tags
Grid
Asked by
Jaap
Top achievements
Rank 2
Answers by
Jaap
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or