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

Grid data Refresh

1 Answer 4452 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pratap
Top achievements
Rank 1
Pratap asked on 25 Feb 2019, 02:10 PM
Could you provide an example of "Refresh" button implementation?

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 27 Feb 2019, 09:05 AM
Hi Wayne,

In general, the Grid will be rerendered with the latest data when the collection/object its data input or kendoGridBinding directive is bound to, thus there is no built-in "refresh" functionality or UI as the developer is in full control of the data passed to the Grid:

https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/

https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/automatic-operations/

You can check out the Grid editing demos that showcase this workflow - the changes are persisted via the data/editing service, and the Grid is rerendered with the latest data read from the server:

https://www.telerik.com/kendo-angular-ui/components/grid/editing/editing-reactive-forms/

https://www.telerik.com/kendo-angular-ui/components/grid/editing/editing-template-forms/

That being said, you can use any custom UI (e.g. a button, icon or text link) that will call a method to read the Grid data again, or replace the existing one with a new one, coming from a data service or other source. You can also use the Grid Toolbar or Pager template to add this custom UI there, e.g.:

https://plnkr.co/edit/Jl6PNt77ZumHrkeUha9R?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
François
Top achievements
Rank 1
commented on 21 Jul 2021, 06:35 PM

Hello!

I don't know if it's possible to run all the sample you put on plnkr because all the sample i tried are crashing with lot of JS error. So, it's impossible to run it.

It's little bit bad

Let me know if you have an idea to fix that.
Dimiter Topalov
Telerik team
commented on 22 Jul 2021, 07:35 AM

Hello François,

The Plunker demos are indeed rather outdated and their configuration is no longer working. The most straight-forward approach to run such an example is to open a Stakcblitz demo from our documentation site, and copy the necessary AppComponent and AppModule content from the Plunker to the Stackblitz, for example:

https://stackblitz.com/edit/angular-pyxnxc?file=app%2Fapp.component.ts

I hope this helps.

Tags
Grid
Asked by
Pratap
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or