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

How to manage remote data with native grid

4 Answers 168 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Etienne
Top achievements
Rank 1
Etienne asked on 18 Feb 2021, 07:45 PM

Hello,

I wonder what is the best way to manage (crud) the remote data when using Native Vue Grid.
To read data, it seems that the best way is to call the ajax service in the "mounted()" hook of the component.
But for create/update/delete, where do I have to call the ajax services ? If I refere to the doc example (https://www.telerik.com/kendo-vue-ui/components/grid/editing/editing-inline/), is it in the "update" method, or there is a better solution ?

Thanks for your help

Etienne

4 Answers, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 23 Feb 2021, 11:16 AM

Hello Etienne,

In general, we recommend the Grid to be used as it is demonstrated in the example you've linked. Yes, you can call the 'read' method in the mounted hook. 

Define the logic for the other CRUD(create, update, delete) operations in separate methods that are called when a given Grid button is clicked. You can see the same approach in the implementation in the example from your initial post here. 

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Etienne
Top achievements
Rank 1
answered on 01 Mar 2021, 09:51 AM

Hello Petar,

Thank you for your reply, It's clear.

 

Best regards

Etienne

0
Petar
Telerik team
answered on 04 Mar 2021, 06:42 AM

Hello Etienne,

I am happy to hear that your question is cleared. If you need further assistance with the current thread you can continue the communication anytime.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Petar
Telerik team
answered on 10 Feb 2022, 02:53 PM

Hello Everyone,

Just in case someone land on this thread here is an example demonstrating how we can use the Grid in a CRUD scenario with an OData remote service. 

I believe the example will be useful for those of you who need similar functionality in their projects. Very soon the example will be added to the Grid component documentation. Meanwhile, you can use the above example as a reference. 

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Etienne
Top achievements
Rank 1
Answers by
Petar
Telerik team
Etienne
Top achievements
Rank 1
Share this question
or