ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: harishn007 on August 26, 2021, 11:06:18 pm

Title: How to load data on button click rather than loading by default
Post by: harishn007 on August 26, 2021, 11:06:18 pm
I am understanding the concepts of PQGRID and have found it of great use.
But there one thing that I am finding difficulty is in loading data on click of a button rather than loading by default.

Hope you'll help me with same.
Title: Re: How to load data on button click rather than loading by default
Post by: paramvir on August 27, 2021, 10:50:06 pm
It's mentioned here: https://paramquery.com/tutorial#topic-loaddata
Title: Re: How to load data on button click rather than loading by default
Post by: harishn007 on August 27, 2021, 11:11:23 pm
Thank you sir for your reply to my query

The data is loaded from "remote", which is what I am using.
But I don't want to populate or get data when the grid gets initialized,
I want the user to click a button and load the data.

I want to stop the default loading.
Title: Re: How to load data on button click rather than loading by default
Post by: harishn007 on August 30, 2021, 04:11:58 pm
Please help me sir to integrate the same in my project.
Title: Re: How to load data on button click rather than loading by default
Post by: paramvir on August 30, 2021, 09:36:47 pm
Please refer to same url: https://paramquery.com/tutorial#topic-loaddata and follow case 1.

Keep dataModel.location to "local".

Send an ajax request to remote server and assign returned data to dataModel.data followed by call to refreshDataAndView.