Author Topic: Grid Data Refresh after adding new record  (Read 1705 times)

gwinterhalter

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 15
    • View Profile
Grid Data Refresh after adding new record
« on: October 29, 2018, 01:34:41 am »
Hi Paramvir -

We are adding new records to the datasource our grid uses on server and they do not show on grid unless we do a browser page refresh.

Is it possible to add a refresh icon on grid that causes data to be refreshed from server without page reload? Can you post an example to show how to do this?

Thanks

Greg

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Grid Data Refresh after adding new record
« Reply #1 on: October 29, 2018, 01:21:06 pm »
Greg

Complete data in grid can be refreshed by call to refreshDataAndView()

https://paramquery.com/pro/api#method-refreshDataAndView

A button can be added in the toolbar.

Code: [Select]
{
    type: 'button',
    label: "Refresh",                   
    listener: function () {
this.refreshDataAndView();
    }
}