ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: mikep on July 06, 2021, 11:51:18 pm

Title: Conditional Editable
Post by: mikep on July 06, 2021, 11:51:18 pm
I am able to make a column read only, based on its contents using the following:
                                colAP.render = function (ui) {
                                    var rd = ui.rowData; //.children[0];
                                    var zz = rd.pq_cellprop = rd.pq_cellprop || {};
                                    zz[ui.dataIndx] = { edit: false };
                                    if (rd["My Resource"].indexOf("Yes") > -1) {
                                            zz[ui.dataIndx] = { edit: true };
                                    }
                                }
                                colDT.push(colAP);

However, if user drags contents from another cell to this cell, its editable. How can I prevent a cell like above from not being editable on drag/fill?
Title: Re: Conditional Editable
Post by: paramvir on July 09, 2021, 08:52:25 am
Please use column.editable callback to implement conditional editable on column cells.

Example: https://paramquery.com/pro/demos/readonly_cells