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

Two KendoGrids on same View

2 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahendra
Top achievements
Rank 1
Mahendra asked on 14 Aug 2015, 02:30 AM
I have Two relational KendoGrids on same MVC View. I need to apply CRUD operations for both the grids. Please suggest me the best approach to do Insert/Update/Delete operations for both the grids altogether.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 17 Aug 2015, 01:39 PM
Hello Mahendra,

In order to apply the same CRUD changes to both Grids (assuming that the two Grids are bound to different data, i.e. different database tables), you need to subscribe to the CRUD-related events of each Grid and apply the corresponding changes to the other Grid by using its DataSource API.

 -save event
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-save

- remove event
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-remove

How to retrieve a Grid's DataSource instance
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#fields-dataSource

How to execute CRUD operations manually on a Kendo UI DataSource instance

- insert
http://docs.telerik.com/KENDO-UI/api/javascript/data/datasource#methods-add
 
- update
http://docs.telerik.com/KENDO-UI/api/javascript/data/datasource#methods-get
http://docs.telerik.com/KENDO-UI/api/javascript/data/model#methods-set
 
- delete
http://docs.telerik.com/KENDO-UI/api/javascript/data/datasource#methods-remove
 
How to submit changes to the remote datasource
http://docs.telerik.com/KENDO-UI/api/javascript/data/datasource#methods-sync

Regards,
Dimo
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Mahendra
Top achievements
Rank 1
answered on 20 Aug 2015, 10:18 PM
Thanks resolved
Tags
Grid
Asked by
Mahendra
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Mahendra
Top achievements
Rank 1
Share this question
or