ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: mikep on April 06, 2021, 12:43:48 am

Title: Temporarily change column to editable when adding new row
Post by: mikep on April 06, 2021, 12:43:48 am
I'm adding new rows to the grid, but need to make certain non-editable columns editable in order to populate w/data, then set these columns back to non-editable.
Here's my JS to add the data/rows. How can I make the columns editable, add the data, then make then non-editable again.

                        var newRowList = [];
                        for (i = 0; i < rpmData.length; i++) {
                            newRowList.push({ newRow: rpmData });
                        }
                        $gridMain.pqGrid("addRow", { rowList: newRowList });
Title: Re: Temporarily change column to editable when adding new row
Post by: paramvir on April 06, 2021, 11:50:53 am
It's easier to pass checkEditable parameter to addRow to bypass non-editable columns.

Code: [Select]
$gridMain.pqGrid("addRow", { rowList: newRowList, checkEditable: false });

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