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

Pages: [1]
1
Hi,

I am trying to follow this example and make auto summary for one of my column, but it does not work
https://paramquery.com/pro/demos62/group_summary

Code: [Select]
                var groupModel = {
                    on: true,
                    merge: true,
                    dataIndx: ['inspectionName'],
                    showSummary: [true],
                    header: isEditMode,
                    collapsed: [true],
                    title: [
                        "{0} ({1})",
                        "{0} - {1}"
                    ]
                };

I added additional properties to that specific column
Code: [Select]
{
                               summary: { type: "sum" },
                                dataType: "float",
                                format: '$##,###.00'
                            }

If i remove summary: { type: "sum" } then I can see values (numbers) in that column, but with summary I get $0.00 for each row and summary Sum: $0.00. What I am doing wrong?

I also try following this example (custom summary) but again custom function agg.all was called for each row and for each group. And I expected to get called for each group and to provide me with array of data values that belongs to that group. If I use same agg.all function from the example I get 0 again
https://paramquery.com/pro/demos62/group_rows_custom_summary

Thank you,
Best Regards

2
ParamQuery Pro Evaluation Support / Re: Group level read only
« on: March 06, 2020, 09:04:16 pm »
It removed complete header. Not quite what I was expecting, but good enough.
Thank you.

3
Suggest new features / Set initial expand / collapse group element
« on: March 06, 2020, 09:01:33 pm »
Hi,

I would love to preserve current collapse / expand state in the database. So I need to set it initially that for example 2nd, 4th and 5th group are collapsed and all other expanded in first level and then again for each sub level to set which one is collapsed and which one is expanded. Is that possible? I found to set collapse / expand state for all.

I found event beforeGroupExpand but could not find enough data in ui object

one of ui example:
level: 1
close: true
group: "12000"

but in level: 1 there can be multiple values "12000" (possible for each group in level: 0) so i am not sure which one is collapsed

Best Regards

4
ParamQuery Pro Evaluation Support / Group level read only
« on: March 06, 2020, 06:58:28 pm »
Hi,

How to disable removing existing group levels and / or re-order of existing levels?

Best Regards

5
Hi,

We bought v6.0.0. Pro and use it in our single page application (pqgrid.min.js v6.0.0 is amd module) and now we would like to upgrade to v7. I downloaded Evaluation Pro zip and just noticed that pqgrid.min.js v7 is now commonjs module. Do you still support / have library in amd module as well?

Best Regards

6
Help for ParamQuery Pro / Re: Error when commit is called
« on: February 02, 2018, 02:45:07 pm »
Hi,

Thank you for your answer.
I managed to fix it by myself. I start debugging this morning and realized that I have to specify column ID in colModel and I did not.

7
Help for ParamQuery Pro / Get current selected rows
« on: February 02, 2018, 02:05:58 pm »
Hi,

Is there any way to get all selected rows or I have to do it manually?
I can listen to rowSelect event and use ui.addList and ui.deleteList and keep that list manually, but problem arise since user can delete one or more seletected rows and use Undo / Redo. Then it is hard to say what is selected or not.
I can use jQuery to access all .ui-state-highlight divs, but then is there a way to get data corresponding to that div?

Thank you

8
Help for ParamQuery Pro / Refresh filter select
« on: February 02, 2018, 01:48:48 pm »
Hi,

I have filter select (drop down) with all distinct values for current column.

                        filter: {
                            type: "select",
                            listeners: ['change'],
                            prepend: { '': i18n.t('local:common.pleaseSelect') },
                            options: paramQueryService.getCallbackFilterOptions(),
                            condition: filterCondition
                        }

in getCallbackFilterOptions
        return function (ui) {
            var distinctValues: any[] = grid.getData({ 'dataIndx': [ui.dataIndx] });
            ...
            return distinctValues;
        };

and filter is working, but I would like to refresh this list in case user change some data in any that column.

Is there any API call that will force filter to call callback function attached to filter.options and refresh items in select? Or is there any other way to do that?
I was playing with
$( ".selector" ).pqGrid( "refresh" );
$( ".selector" ).pqGrid( "refreshDataAndView" );
grid.refreshHeaderFilter({ dataIndx: 'ShipRegion' });
but even it calls that callback, items remains same

If I have to do it manually. I was thinking to listen to cellSave event and to use
grid.getData({ 'dataIndx': [dataIndx] });
to get all distict value, but then to use jQuery to access that select and somehow sync values.

Thank you.

9
Help for ParamQuery Pro / Error when commit is called
« on: January 31, 2018, 05:44:29 pm »
Hi,

I have an issue when creating new items in a grid. When I create new item in a grid and after response from server I call
grid.commit({ type: 'add', rows: changes.addList });
I am getting java script error

jsnlog.js:648 window.onerror logger: {"stack":"TypeError: Cannot read property 'dataIndx' of undefined\n    at l.saveCell (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:9:30945)\n    at t.(anonymous function).(anonymous function).l._digestUpdate (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:22122)\n    at t.(anonymous function).(anonymous function).l._digestData (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:21735)\n    at e.cUCData.commit (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:13:13131)\n    at t.(anonymous function).(anonymous function).n.commit (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:13:19130)\n    at Object.onSuccess (http://localhost:51125/App/services/custombindings.js:1105:38)\n    at AnonymousObserver._onNext (http://localhost:51125/App/components/limitIntervalsEdit/limitIntervalsEdit.js:167:28)\n    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (http://localhost:51125/Scripts/lib/RxJS/rx.all.js:1828:18)\n    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (http://localhost:51125/Scripts/lib/RxJS/rx.all.js:1762:37)\n    at AnonymousObserver.tryCatcher (http://localhost:51125/Scripts/lib/RxJS/rx.all.js:63:39)","message":"Cannot read property 'dataIndx' of undefined","name":"TypeError","logData":"window.onerror Error: Uncaught TypeError: Cannot read property 'dataIndx' of undefined\nurl: http://localhost:51125/Scripts/lib/RxJS/rx.all.js\nline #: 77"} : (http://localhost:51125/Scripts/lib/paramquery/pqgrid.min.js:10:21735)

what is a structure of rows in commit method?
Server side is creating new items and set ids. I set new ids to grid.getChanges().addList and try to use this in commit

In case I do not add anything and call
grid.commit({ type: 'add', rows: changes.addList });
grid.commit({ type: 'update', rows: changes.updateList });
grid.commit({ type: 'delete', rows: changes.deleteList });
everything seems fine (red triangles are gone) or even commit without any parameter
grid.commit();
looks fine, but then ids for newly created items remain empty and after another Accept Changes server side re create them again.

Best Regards

Pages: [1]