Author Topic: New row comit and pq_detail column  (Read 2852 times)

MichalV

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 11
    • View Profile
New row comit and pq_detail column
« 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!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6385
    • View Profile
Re: New row comit and pq_detail column
« Reply #1 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?

MichalV

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: New row comit and pq_detail column
« Reply #2 on: March 25, 2025, 03:18:03 pm »
Because my grid uses Row details with tabs, based on your demo in "Nesting / Row details"

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6385
    • View Profile
Re: New row comit and pq_detail column
« Reply #3 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.

MichalV

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: New row comit and pq_detail column
« Reply #4 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.
« Last Edit: March 25, 2025, 11:16:28 pm by MichalV »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6385
    • View Profile
Re: New row comit and pq_detail column
« Reply #5 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.

MichalV

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: New row comit and pq_detail column
« Reply #6 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?