Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Bug Report / Re: error when cell value is cleared or only spaces are entered
« Last post by omerix on July 21, 2025, 09:39:21 pm »
Yes, I was using fmtDate. Once I removed it as you suggested, it worked perfectly — you're awesome, thank you! 🙌

I had been including it by default in all my grids to ensure consistent date formatting.

What would be the recommended approach now to apply a standard date format across all grids going forward?

Code: [Select]
,fmtDate:'dd/mm/yyyy',fmtDateEdit:'dd/mm/yyyy',fmtDateFilter:'dd/mm/yyyy'

22
Bug Report / Re: error when cell value is cleared or only spaces are entered
« Last post by paramvir on July 21, 2025, 09:30:52 pm »
Have you specified fmtDateEdit option in your grid initialization object?

https://paramquery.com/pro/api#option-fmtDateEdit
23
Bug Report / error when cell value is cleared or only spaces are entered
« Last post by omerix on July 21, 2025, 08:24:47 pm »
Hello,

I'm using ParamQuery Pro v10.1.0

I'm encountering a bug when editing a cell with `dataType: "string"` — even though the column is not a date field, the following error occurs **after I delete the cell content** using Backspace or **enter only spaces**, then press **Tab** to move to another cell.

Here is the console error:

Code: [Select]
Uncaught TypeError: can't access property 0, f is null
    at parseDateFromFmt (pqgrid.dev.js:1883)
    at parseDate (pqgrid.dev.js:1899)
    at deformat (pqgrid.dev.js:2835)
    at getEditCellData (pqgrid.dev.js:3487)
    at saveEditCell (pqgrid.dev.js:3044)
    at saveAndMove (pqgrid.dev.js:4354)


### Reproduction Steps:

1. The column has `dataType: "string"`, no special `editor.format` or custom parse logic.
2. Enter any value in the cell, then delete it using Backspace and press Tab.
3. OR enter only space characters (`"   "`), then press Tab.
4. This throws the error above.

---

### What I Tried:

I attempted to sanitize the value using `beforeCellSave`:

Code: [Select]
beforeCellSave: function (evt, ui) {
  if (typeof ui.newVal === 'string' && ui.newVal.trim() === '') {
    ui.newVal = null;
  }
}

Unfortunately, this **did not fix** the issue.
The error still occurs, and strangely, `parseDateFromFmt()` is triggered even though the column is not a date field.

---

### What I Need Help With:

* Why is `parseDateFromFmt` called at all for a `dataType: "string"` column?
* What’s the proper way to prevent this error when the cell is cleared or contains only whitespace?
* Is this a known issue or do I need to override some internal formatter?

Any guidance or recommended workaround would be greatly appreciated.

**Can I record a short video showing the issue and send it to you via email?**
Thanks in advance.



colmodel sampla
Code: [Select]
,{title:'Sample',dataIndx:'vdata',dataType:'string',minWidth:24,width: 200,cls:'',clsHead:'',align:'',halign:'center',aciklama:'vdata',hidden:false,editable:true
,filter: { crules: [{ condition:'contain'}],menuIcon:false}
}
24
Help for ParamQuery Pro / Re: Add an html element in a blank filter column cell.
« Last post by paramvir on July 21, 2025, 07:56:44 pm »
non filter cells in filter row are not configurable, however following workaround can be used:

Code: [Select]
filter:{
crules:[{condition:'equal'}],//use some condition.
init: function(ui){
ui.$cell.html("Empty");//insert custom html.
return true;
}
}
25
Help for ParamQuery Pro / Re: Equivalent of getNode(ID) for a normal grid
« Last post by paramvir on July 21, 2025, 07:28:04 pm »
There's no equivalent in plain grid.

rowData can be obtained from id as:

Code: [Select]
const row = grid.option('dataModel.data').find(r => r.id === '1234');

for performance-critical code, creating a lookup object as mentioned by you is most efficient way to get row data from id.
26
Help for ParamQuery Pro / Add an html element in a blank filter column cell.
« Last post by jplevene on July 20, 2025, 11:19:55 pm »
In my grid, some cells have filters, others don't.  In one of the columns that does NOT have a filter (so the filter cell is blank), I want to insert my own HTML element.  How do I do this?
27
Help for ParamQuery Pro / Equivalent of getNode(ID) for a normal grid
« Last post by jplevene on July 20, 2025, 04:01:10 am »
In a treeGrid I can get a node using getNode() and passing the ID value in the rowData.

The only way to do this I can see on a normal grid is to create a lookup object {"1234":row, ...} once the data has loaded from the remote source.  Is there a better way?
28
ParamQuery Pro Evaluation Support / Re: updateRow could not update cells in grid
« Last post by hyh888 on July 19, 2025, 07:36:02 pm »
It works, thank you very much.
29
ParamQuery Pro Evaluation Support / Re: updateRow could not update cells in grid
« Last post by paramvir on July 18, 2025, 03:07:39 pm »
this is incorrect: ui.rowData can't be passed as newRow param of updateRow method.

Create a new object {} containing only the changes to pass it as newRow param.

Please check the documentation:

https://paramquery.com/pro/api#method-updateRow
30
ParamQuery Pro Evaluation Support / updateRow could not update cells in grid
« Last post by hyh888 on July 18, 2025, 01:50:08 pm »
Dear Team,
               for (let key in data) {
                        ui.rowData[key] = data[key];
                }
When using pqgrid v9,   I found that this program can update cells in grid( some data in fields of ui.rowData has been changed with program above ):             $grid.pqGrid("refreshRow",{rowIndx:ui.rowIndx});
but using following program, cells could not be updated.
               $grid.pqGrid("updateRow",{
                    rowIndx: ui.rowIndx,
                    newRow: ui.rowData,
                    checkEditable:false,
                    refresh: true
                });
 Would you like to provide any advice?
Pages: 1 2 [3] 4 5 ... 10