ParamQuery grid support forum

General Category => Bug Report => Topic started by: MichalV on March 03, 2025, 08:58:19 pm

Title: New row comit and pq_detail column
Post by: MichalV on March 03, 2025, 08:58:19 pm
Hi Paramvir,

After the data saving the "add" commit fails if the grid includes pq_detail column (recIndx remains empty)
As a workaround I use the following code before the comit:

Code: [Select]
grid.Columns().find(function (column) {
    if (column.dataIndx == "pq_detail") {
        grid.Columns().hide({ diHide: ["pq_detail"] });
    }
});


And the following after the commit:

Code: [Select]
grid.Columns().find(function (column) {
    if (column.dataIndx == "pq_detail") {
       grid.Columns().hide({ diShow: ["pq_detail"] });
    }
});

Is it possible to fix it in the next release? E.g. skip the pq_detail column in the grid.commit function?
Thanks in advance for you help!
Title: Re: New row comit and pq_detail column
Post by: paramvir on March 21, 2025, 11:46:01 am
I don't understand why you have added pq_detail in the colModel. Can you please clarify?
Title: Re: New row comit and pq_detail column
Post by: MichalV on March 25, 2025, 03:18:03 pm
Because my grid uses Row details with tabs, based on your demo in "Nesting / Row details"
Title: Re: New row comit and pq_detail column
Post by: paramvir on March 25, 2025, 03:24:55 pm
pq_detail is not used in the colModel in any of the nesting / row details examples.

Have you tried removing pq_detail from colModel.
Title: Re: New row comit and pq_detail column
Post by: MichalV on March 25, 2025, 11:10:49 pm
Yes, when I remove the pq_detail column (column with type: "detail") the commit works well after adding new row.
Title: Re: New row comit and pq_detail column
Post by: paramvir on March 25, 2025, 11:20:17 pm
pq_detail and column with type: "detail" are not the same. pq_detail is a property of the rowData while column of type: 'detail' is used for nesting or row details.
Title: Re: New row comit and pq_detail column
Post by: MichalV on March 25, 2025, 11:38:55 pm
Ahh my apologies, I added the dataIndx: "pq_detail" by myself to the column of type: 'detail' so can hide it before the commit. Anyway if the detail column exists the commit does not work. If I remove it from the grid the commit works. Any idea how to fix that?