ParamQuery

General Category => Help for ParamQuery Pro => Topic started by: angelahlp on January 02, 2021, 02:59:01 am

Title: disable/enable row/cell dynamically after grid is created
Post by: angelahlp on January 02, 2021, 02:59:01 am
I need to dynamically disable a row or cell based on the recId. The recId is being sent from an outside source and the related row/cell needs to be disabled/enabled accordingly.

Can you tell me how to accomplish that. I saw the "editable" "option" and demo, but can't seem to get it to work.
Title: Re: disable/enable row/cell dynamically after grid is created
Post by: paramvir on January 04, 2021, 02:49:16 pm
Conditional editability for rows / cells can be obtained with editable callback.

https://paramquery.com/pro/api#option-editable for rows.

https://paramquery.com/pro/api#option-column-editable for columns.

Code: [Select]
editable: function(ui){
  if(ui.rowData.recId == 'some value' ){
    return true or false;
  }
}