Author Topic: Conditional Editable  (Read 1126 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Conditional Editable
« 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?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Conditional Editable
« Reply #1 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