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
1
Help for ParamQuery Pro / Re: Apply filter to Grid at Pivot mode (Pro 8.1.0)
« on: September 17, 2021, 12:10:31 pm »
Good news. The workaround is still working if using this to turn off the pivot mode (and to turn on by change the "false" to "true").
Code: [Select]
    if (pivot) {
        grid.Group().option({
            pivot: false
        });
    }

I still like to see the loadState working with pivot mode and filters.

2
Help for ParamQuery Pro / Apply filter to Grid at Pivot mode (Pro 8.1.0)
« on: September 17, 2021, 11:41:00 am »
Hello,

Before 8.0.1, I have a workaround for this.
1. turn off the pivot mode for the grid
2. apply the filter to the grid
Code: [Select]
grid.filter({
            oper: 'replace',
            mode: 'AND',
            rules: [
                { dataIndx: 'FacilityName', condition: 'begin', value: filterFacilityName },
            ]
        });
3. turn on the pivot mode for the grid
However, with 8.0.1 and 8.1.0, it seems the workaround is not working any more. At the 2 step, it complains an error of "Uncaught !primary.getDMData".

By the way, the loadState for Pivot mode with filter values is still not working.  The details are at
https://paramquery.com/forum/index.php?topic=4087.0

3
Bug Report / Re: loadState failed when loading a grid (8.0.1)
« on: September 03, 2021, 03:50:58 pm »
Hi paramvir, this is a great news.

I tried Pro 8.1.0 and the issue mentioned above is fixed. However, it doesn't seem to support to restore the pivot state and the filters if any.
Meaning that if a Web user switched the grid from the normal mode to the pivot mode and left, it still displays the grid at the normal mode (the checkbox of pivot mode not checked and the columns are for normal mode) when coming back to that page.

I noticed that the pivot flag of the groupModel actually was not saved in the localStorage.  Any luck to enable it?

Thanks.


4
Please use groupChange event instead of groupOption event.

Code: [Select]
groupChange: function(){
  this.sort();
}

Try this if the above doesn't work
Code: [Select]
groupChange: function(){
  var grid = this;
  setTimeout(function(){
    grid.sort();
  }); 
}
Hi paramvir, it looks the groupChange event is not fired when dragging and dropping a column on the toolPanel but the groupOption is.
I tried your setTimeout method in groupOption and it worked. Thanks.

5
Thanks. I am using Pro 8.0.1.

Your approach by sorting the data inside the complete event is working at the first page load.

When updating the group by adding/removing columns into/from the row group, the sorting is gone.
Any idea to ensure the sort of the group?

Note the screenshots are not well ordered. See the FirstLoad, 2.AddStageToGroup then 3.SecondLevelNotSorted.
By the way, I tried "this.sort()" inside the groupOption event, but it didn't help.

6
Please check the image attached

7
Hello there,

we want to sort the grp column by default.
Code: [Select]
groupModel: {
            checkbox: true,
            checkboxHead: true,
            on: true,
            pivot: false, //pivotMode
            summaryInTitleRow: 'all', //to display summary in the title row.
            header: false, //hide grouping toolbar.
            grandSummary: true,
            titleInFirstCol: true,
            titleIndx: 'grp',
            fixCols: false,
            dataIndx: ['Item'],
            groupCols: [], //grouping along column axis.
            collapsed: [true, true],
            agg: {
                Count: "sum"
            },
            showSummary: [false], //to display summary at end of every group.
            title: [
                "{0} ({1})",
                "{0} - {1}"
            ],
            summaryTitle: {
                sum: ""
            }        },
sortModel: {

            sorter: [{ dataIndx: 'grp', dir: 'up' }],
            space: true,
            ignoreCase: true,
            multiKey: null,
            single: false
        }


However it is not working. It shows the small triangle but actually it is not sorting.



we also want to keep the group sorted at the pivot mode. Still no luck.
If we choose another column other than the "grp" column - such as the Item column in the example, it works.


Any idea? thanks.

8
Bug Report / Re: loadState failed when loading a grid (8.0.1)
« on: July 13, 2021, 04:16:47 pm »
another issue related to the pivot grid is that  some of the grid themes (JQuery themes such as Dark Hive, Dot Luv, Egg Plant, etc.) don't work well on the tool panel.

9
Bug Report / Re: loadState failed when loading a grid (8.0.1)
« on: July 08, 2021, 09:49:07 am »
nzxgq0

I'm able to reproduce the issue while loadState with pivot, moving it to bug log for further analysis.

Thanks. With the following option, loadState always fails. I hope we can have a quick solution.
        toolPanel: {
            show: true  //show toolPanel initially.
        }

10
Bug Report / loadState failed when loading a grid (8.0.1)
« on: July 07, 2021, 03:25:03 pm »
I have a pqgrid with the pivot feature.
However it fails when loading the grid with the state maintenance (https://paramquery.com/pro/demos/grid_state).
It looks "this.panes" is not initialized when calling the method.
Any idea?
Code: [Select]
22794      setAttrPanes: function() {
22795        this.$ele.attr("panes", this.panes.filter(function($ele) {
22796                return $ele.is(":visible")
22797            }).length)
22798        }


Uncaught TypeError: Cannot read property 'filter' of undefined
    at _pq.cToolPanel.setAttrPanes (pqgrid.dev.js:22795)
    at _pq.cToolPanel.showHideColPane (pqgrid.dev.js:22819)
    at _pq.cToolPanel.setHtml (pqgrid.dev.js:22773)
    at _pq.cToolPanel.refresh (pqgrid.dev.js:22717)
    at _pq.cToolPanel.onGroupOption (pqgrid.dev.js:22643)
    at handleListeners (pqgrid.dev.js:791)
    at $.<computed>.<computed>._pq._trigger (pqgrid.dev.js:836)
    at _pq.cGroup.option (pqgrid.dev.js:15838)
    at _pq.cGroup.option (pqgrid.dev.js:22358)
    at $.<computed>.<computed>.fn.loadState (pqgrid.dev.js:8784)

11
It should go to ParamQuery Pro 7.4 ~ 7.6.1 however my subscription is need of renew and I cannot post it there.
We have several web pages created using pqgrid and when jumping between them. It often complains this JavaScript error.

Uncaught TypeError: Cannot redefine property: nodeClose
    at Function.defineProperty (<anonymous>)
    at new e.cTree (eval at <anonymous> (jquery-1.10.2.min.js:21), <anonymous>:16:16031)
    at HTMLDocument.eval (eval at <anonymous> (jquery-1.10.2.min.js:21), <anonymous>:16:15883)
    at HTMLDocument.dispatch (jquery-1.10.2.min.js:22)
    at HTMLDocument.v.handle (jquery-1.10.2.min.js:22)
    at Object.trigger (jquery-1.10.2.min.js:22)
    at init.triggerHandler (jquery-1.10.2.min.js:22)
    at $.<computed>.<computed>.o._create (eval at <anonymous> (jquery-1.10.2.min.js:21), <anonymous>:10:1248)
    at $.<computed>.<computed>._create (jquery-ui.js:144)
    at $.<computed>.<computed>._super (jquery-ui.js:129)

Refreshing fixes it but it is too annoying.
ParamQuery Pro 7.1.0 is OK.

Any thoughts?

12
Help for ParamQuery Pro / How to auto adjust column width
« on: October 29, 2020, 01:25:24 pm »
Hello,

I have a grid which allows user to select the columns to display. Two issues:

1. Is there a way to automatically adjust the grid's column width based on user's selection?

2. How to set the font size or the row height on the selection dialog?

Thanks,
NZXGQ0

13
For large datasets, it's possible to divide one ajax call into multiple calls and keep updating the dataModel.data as more data arrives from server.

Server side script receives current page and records per page from grid and sends the requested data back.

Code: [Select]
postData: function () {
                return {
                    pq_curpage: pqIS.requestPage,
                    pq_rpp: pqIS.rpp
                };
            },

These 2 examples use this methodology:

https://paramquery.com/pro/demos/infinite_scroll

https://paramquery.com/pro/demos/virtual_scroll

Thanks. It solves my problem.
By the way, I found that the local export functionality has its limits. For example, it's OK to export 200K records as Excel but it fails when the count of the records reaches 300K. But the upper limit is larger if exporting as HTML.

14
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.

15
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.

Pages: [1] 2