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

Save kendo grid batch edit along with other field

3 Answers 248 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 03 Jan 2013, 09:04 AM
I have a scenario where I want to save kendo grid batch edit and other fields in the form in one submit button press. 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Jan 2013, 09:16 AM
Hello John,

We have a code-library which demonstrates how can the Grid values be saved with the other form values. Please check it on this page.

Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hatton Point
Top achievements
Rank 1
answered on 28 Jan 2013, 01:49 AM
Daniel,

I have the same requirements, but following your example I'm not seeing how to apply to saving changes back to a database. Can you provide a better real world example?

Here is the process I need...

1) Edit grid in batch (inline) mode
2) Submit form.
3) Controller saves grid data to db (calling data layer) + other data saved (different data layer call).

Another option, perhaps better, would be to Save the Grid via an API call and then continue on to submit the rest of the form, do other stuff, etc. The DataSource.Update method would be wired up just like normal. The "Save" button in the template somehow makes this call, but I don't know how to wire it up manually. The rest of the form can be processed in normal fashion after the javascript api call is completed.
0
Daniel
Telerik team
answered on 30 Jan 2013, 07:52 AM
Hello,

I am not sure if I understand the issue with the code-library. The Grid data is send to the server along with the form fields and you can save it in the Save action. Could you clarify a bit?
The other option that you have described is also possible. You could call the sync method to save the changes from the Grid dataSource and then post the form in the DataSource sync event.

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