ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: magfi.1234 on July 02, 2015, 02:43:26 pm

Title: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: magfi.1234 on July 02, 2015, 02:43:26 pm
Hi,

We are using Param Query Grid Inside Iframe and updating records in the grid is fast as expected. We just migrated to Param query pro and observe that it is taking long time to update the records and also the Iframe is responding very slow on mouse click if we load grid with more than 3000 records. Below is code we used to update the records in the database.

searchUsrGrid.pqGrid("option", "dataModel.data", users);
searchUsrGrid.pqGrid("refreshView");

Quick help is appreciated as we have release in coming weeks.

Thanks
Magfirulla
Title: Re: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: paramvir on July 02, 2015, 02:56:58 pm
Virtual mode is the performance mode which can be enabled by simply setting the 2 properties virtualX & virtualY to true.

API Ref:

http://paramquery.com/pro/api#option-virtualY
http://paramquery.com/pro/api#option-virtualX

Example:

http://paramquery.com/pro/demos/infinite

Please let me know whether it fixes your issue.
Title: Re: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: magfi.1234 on July 02, 2015, 03:57:47 pm
Thank you so much. It resolved the issue.
Title: Re: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: magfi.1234 on July 07, 2015, 05:43:50 pm
Hi,

The option Virtual and Virtual Y resolved the issue. But this fix is creating one more issue. The grid some times may have very less data. In this case if you scroll, the vertical scroll bar gets invisible and we no longer able to scroll up or down.

It can be reproducible in demo below. Just modify number of rows to 12. Then scroll. The vertical Scroll bar gets hidden.

http://paramquery.com/pro/demos/infinite

Thanks
Magfirulla
Title: Re: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: paramvir on July 07, 2015, 07:12:48 pm
Please add this temp fix in the refresh event / callback.


         refresh: function(evt, ui){
               var $grid = $(this),
                  virtualY = $grid.pqGrid('option', 'virtualY'),
                  length = $grid.pqGrid('pageData').length,                           
                  val = (length > 20);//any cutoff number in place of 20

               if(val !== virtualY){                  
                  $grid.find(".pq-sb-vert").pqScrollBar("option", "steps", val);
                  $grid.pqGrid('option', 'virtualY', val).pqGrid( 'refresh' );
               }            
         }
Title: Re: ParamQuery Pro: RefreshView is taking long time to update the records.
Post by: magfi.1234 on July 08, 2015, 02:52:22 pm
Thank. It resolved the issue.