Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nzxgq0

Pages: 1 [2]
16
Quote
However what I want is that the grid doesn't have itself populated with data until user clicks the button.

Set initial dataModel.location to "local" and don't assign any data to grid. When button is clicked, set dataModel.location to "remote" and call refreshDataAndView()

Hello, this approach does work. However it has another issue that the widths of the columns don't refresh but remain the same. Any idea? Thanks.

17
we have a case that the database view has 5 million records. we want to avoid to retrieve all the records as it will get timeout and it also has impact on the server performance. with the remote type and the remote location, we can implement everything nice (of cause, local sort/filter/page has better performance than remote) except export as it inevitably retrieves all the records in one service call.

Any good solution for that?

My idea is that at first the grid sends a request to the remote server and gets the JSON string with a pre-defined size of records (such as 100k records) and fills the data model. When there is more data,  a prompt dialog pops up and user clicks it to retrieve the next batch and appends it to the data model   This repeats until all the data is retrieved. If user clicks cancel, the data model remain unchanged. So user can sort, filter and export at local.

So the question is:
does the pqgrid allow us to append data to the data model?

Thanks.

In another word, we want to divide one Ajax service call to multiple Ajax service calls (with manual confirmation) due to the large volume of records. So manipulating the data model becomes necessary.

18
we have a case that the database view has 5 million records. we want to avoid to retrieve all the records as it will get timeout and it also has impact on the server performance. with the remote type and the remote location, we can implement everything nice (of cause, local sort/filter/page has better performance than remote) except export as it inevitably retrieves all the records in one service call.

Any good solution for that?

My idea is that at first the grid sends a request to the remote server and gets the JSON string with a pre-defined size of records (such as 100k records) and fills the data model. When there is more data,  a prompt dialog pops up and user clicks it to retrieve the next batch and appends it to the data model   This repeats until all the data is retrieved. If user clicks cancel, the data model remain unchanged. So user can sort, filter and export at local.

So the question is:
does the pqgrid allow us to append data to the data model?

Thanks.

19
we have a case that the database view has 5 million records. we want to avoid to retrieve all the records as it will get timeout and it also has impact on the server performance. with the remote type and the remote location, we can implement everything nice (of cause, local sort/filter/page has better performance than remote) except export as it inevitably retrieves all the records in one service call.

Any good solution for that?


20
refreshDataAndView() method is used to load or reload the data ( local or remote ) in the grid. When data location is remote, then grid automatically sends filter/ sorting/paging parameters along with remote request initiated by refreshDataAndView.

filter() method can also be used to reload data in case of remote filtering, when you want to send custom filter parameters. Example: https://paramquery.com/pro/demos/filter

So in listener of search button on toolbar, you can call either refreshDataAndView or filter method.

I know these. Thanks for the reply.
However what I want is that the grid doesn't have itself populated with data until user clicks the button.
Currently, all the examples have the grid populated with data when the page loads for the first time.

21
Help for ParamQuery Pro / Re: How to add datepicker to the toolbar
« on: March 12, 2020, 08:35:17 pm »
Toolbar item has init callback which can be used to initialize the toolbar item control e.g., datepicker or color picker.

Code: [Select]
{
type: 'textbox',
init: function(ele){
$(ele).datepicker();
}
},

very good. thanks.

22
Hello,

I read the examples but found none to resolve this case:
when the page is loaded the first time, the grid just shows the empty table defined by the colModel.
When user clicks a search button on the toolbar, it starts to make the ajax call to load the dataModel and then fresh the grid.

Because we have millions of records in the DB (looks we have to apply remote filtering, paging and sorting rather than local) and it will be reasonable to show the grid after user fires the command.

Thanks in advance.

23
Help for ParamQuery Pro / How to add datepicker to the toolbar
« on: March 11, 2020, 10:53:38 pm »
Hello,

Is there any way to add the date filters (fromDate and toDate) to the toolbar so I can use them for remote filtering?
JQuery-ui provides the Datepicker widget however I haven't figured out how to use it on the toolbar.

Thanks in advance.

24
For this error, jQuery version doesn't matter, this error could be thrown if the code from that demo is used in pqgrid free version

Please ensure that you are using Pro latest version.

Thanks. I believe I am using the Pro latest version.

I don't know what happened. I modified the code as below
        var $toolbar = $grid.find('.pq-toolbar'),
        //var $toolbar = this.toolbar(),

        var grid = $grid.pqGrid("instance");
        grid.filter({
        //this.filter({
and it is working now.

25
Hello,

I am applying the local filtering to my asp.net razor page by referring to
https://paramquery.com/pro/demos/filter_local

However it reports "Uncaught TypeError: this.toolbar is not a function".
I used a different jquery 1.10.2 than 1.9.1 because there is other javascript files depending on that version.
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>

Any idea?
Thanks in advance.

Hua


Pages: 1 [2]