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 - flipo

Pages: [1]
1
Help for ParamQuery Pro / Select row for Treegrid
« on: March 07, 2018, 08:04:17 pm »
How can I obtain the id of the selected row in a Treegrid without checkbox?
Till now I only find a for treeModel a render function but not a rowSelect:function(evt,ui){}?

At the of the treegrid constuction I have put
$('#tree_grid').pqGrid('option','selectionModel',{type:'row',mode:'single'} );

2
Help for ParamQuery Pro / Re: Second grid binding
« on: March 05, 2018, 08:05:25 pm »
Thanks, but how can I acces pqIS2.init() from a script outside the first script?
Now I have the error message 'Uncaught ReferenceError: pqIS2 is not defined'.
Using goldenlayout as div for the tables, scripts are loading while constructing the page.
For the first grid I have an event to load the second grid:
Code: [Select]
var obj = {...
  rowSelect:function(evt,ui){
   var row=ui.addList[0];
   var id=row.rowData.id;

   pqIS2.init()
$('#grid2').pqGrid('option','dataModel.url','<?= $grid2_url ?>&id='+id&pq_start=0&pq_curpage=1&pq_rpp=50&);
$('#grid2').pqGrid('refreshDataAndView');
   }
}
But the original pqIS2.init() is in another script for constructing the second div and not in the same script.
So how can I redefine it or acces it?


[size=78%] [/size]

3
Help for ParamQuery Pro / Second grid binding
« on: March 03, 2018, 09:21:09 pm »
I have 2 grids with remote data and infinity scrolling on the same page in a different div.
When a row is selected in the first grid, the second grid shows the result with the code

Code: [Select]
$('#grid2').pqGrid('option','dataModel.data',[]);
$('#grid2').pqGrid('refresh');
$('#grid2').pqGrid('option','dataModel.url','<?= $grid2_url ?>&id='+id&pq_start=0&pq_curpage=1&pq_rpp=50&);
$('#grid2').pqGrid('refreshDataAndView');

But the grid shows all previous rows for the rows greater that the new total.
Is there a better and correct way for binding 2 grids?

4
Thanks, works fine!

5
In Excel only the rows loaded into the grid are visible and not the complete data (all the rows) with virtual scrolling. How can I export the complete data and not only the rows loaded into the grid?
I found a way, but it's not what I want: First I click on the reload button to load 1000000 rows at once.
When I click onto the Excel Export all the rows are displayed.

So I try to the same method without clicking the Reload button before Excel Export, but that doesn't work.
Only the loaded rows are also displayed in the Excel, because the Export starts immediately before the grid was reloaded.

Is there a way to add an event to refreshDataAndView so that the Excel Export can only start after the refresh.
Or is there a better method for Excel Export with remote data and virtual scrolling?

Here is the actual code:

var obj = {
  toolbar: {
            cls: 'pq-toolbar-export',
            items: [{
                type: 'button',
                label: 'Reload',
                icon: 'ui-icon-arrowrefresh-1-e',
                listeners: [{
                    "click": function (evt) {     
                        pqVS.rpp=1000000;     
                        $grid.pqGrid('refreshDataAndView');
                        }
                    }]
                },
                {
                type: 'button',
                label: 'Excel Export',
                icon: 'ui-icon-document',
                listeners: [{
                    "click": function (evt) {
                        pqVS.rpp=1000000;
                        $grid.pqGrid('refreshDataAndView');
                        $("#grid_php").pqGrid("exportExcel", { url: "export_xls.php", sheetName: "pqGrid sheet", filename: "TEST" });
                        }
                    }]
                }
                ]
            }

Pages: [1]