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

Pages: [1] 2 3 ... 424
1
Please add offset in the compare function for now to make the dates comparable.

Code: [Select]
            compare: function (cd, val) {
              var offset = new Date(val).getTimezoneOffset() * 60 * 1000

              val += offset

              if (cd - val >= 0 && cd - val < 24 * 3600 * 1000) {
                return true
              }
            },

This compare function assumes that all dates in column are in datetime format while the date entered in filter box is date only. If dates in column are also dates ( without time ), then don't add offset to the val.

https://jsfiddle.net/erpmgxto/3/

2
Help for ParamQuery Select / Re: Single select checkbox
« on: February 14, 2025, 10:08:58 pm »
radio: true is used in the initialization object while initializing paramquery select control.

It's demonstrated in 1st example on this page: https://paramquery.com/select

API reference: https://paramquery.com/api/select#option-radio

3
I'm able to reproduce the issue and looking into it.

4
As mentioned in your post, I've added fmtDate: "dd-mmm-yyyy" and use your column definition for Order Date in this jsfiddle.

https://jsfiddle.net/4aLsdhy8/2/

it works fine in v10.1.0, note that I've added fmtDateFilter: "dd-mmm-yyyy" to match it with fmtDate

Please advise.

5
Help for ParamQuery Pro / Re: Increase the size of the "Loading" box
« on: February 12, 2025, 10:16:35 pm »
Please use this css:

Code: [Select]
div.pq-loading-mask{
  height:auto; width: auto;
  margin:0;
  transform: translate(-50%,-50%);
}

It's been added to the upcoming version.

6
Help for ParamQuery Pro / Re: Example of how to save changes to cell data
« on: February 10, 2025, 09:53:32 pm »
Please ensure to set trackModel to on.

https://paramquery.com/pro/api#option-trackModel

and set the primary key of the records.

https://paramquery.com/pro/api#option-dataModel-recIndx

8
Either pass render: true to exportData method or add exportRender: true to the column.

https://paramquery.com/pro/api#option-column-exportRender

9
It's because of the validation for ISO formatted dates in those columns.

Code: [Select]
{ type: 'regexp', value: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$', msg: 'Not in yyyy-mm-dd format' }

Also either dates in ISO format or mm/dd/yyyy are accepted as valid dates in dataType: 'date' columns.

You can intercept the other formatted date values in beforePaste event so as to convert them to ISO format before pasting them to cells.

https://paramquery.com/pro/api#event-beforePaste

10
Normally users work on separate browsers and the state is saved in their browsers.

it doesn't make sense to store the states for different users in a common local storage unless you can clarify it a bit more.

You can load different colModel for different users in server side code.

11
Help for ParamQuery Pro / Re: Excluding row data in Group Totals
« on: February 03, 2025, 02:20:01 pm »
Yes, rows can be excluded conditionally by defining and using custom aggregates.

Step 1: Define custom aggregate:

Code: [Select]
pq.aggregate.customSum = function( arr, col, rows ){
   //iterate over desired rows and return the aggregate.
}

Step 2: use in column definition:

Code: [Select]
title: "Amount", width: 85, format: '$ #,###,###.00', align: "right", dataIndx: "AMOUNT", summary: { type: "customSum" },

Reference: https://paramquery.com/pro/api#method-aggregate

12
Help for ParamQuery Pro / Re: Setting a Grid Row Color
« on: January 30, 2025, 03:12:29 pm »
Please check this example on applying conditional styles:

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

Also pqgrid supports spreadsheet format syntax to apply conditional color to -ve values.

Code: [Select]
format: '@;[Red]@',

13
ParamQuery Pro Evaluation Support / Re: PQGrid fully supports React 18
« on: January 29, 2025, 01:42:22 pm »
yes, it supports React18.

Please check this example: https://paramquery.com/pro/demos/react18_locale

14
there are 2 ways to initially check checkboxes in all rows:

1) Either set chk property of every row to true.

or

2) In complete event, call the checkbox API, grid.Checkbox('Activity').checkAll();

reference: https://paramquery.com/pro/api#method-Checkbox

15
There is no need to use load event to apply initial filtering.

The initial filter options can be set just by adding column.filter option. It works same for local and remote filtering.

Code: [Select]
{ title: "Customer Name", width: 120, dataIndx: "ContactName",
                filter: {
                    crules: [{condition: 'begin', value: 'M' }]                   
                }
            },

Remote server is called only once as the filtered data is loaded initially.

Pages: [1] 2 3 ... 424