ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: chirag on June 29, 2018, 10:44:42 am

Title: disable row edting
Post by: chirag on June 29, 2018, 10:44:42 am
How to disable particular row for editing?
Title: Re: disable row edting
Post by: paramvir on June 29, 2018, 11:02:51 am
Rows can be enabled/ disabled for editing based on any run time condition by using editable callback

https://paramquery.com/pro/api#option-editable
Title: Re: disable row edting
Post by: chirag on August 08, 2018, 12:10:45 pm
I achieved conditional row editing by editable callback. But is there any way to make exception for one column.
I want one column always editable.
Thanks.
Title: Re: disable row edting
Post by: paramvir on August 08, 2018, 01:18:05 pm
Add editable: true to the exception column.

and move editable callback to columnTemplate

Code: [Select]
columnTemplate: {
    editable: function (ui){

    }
}

https://paramquery.com/pro/api#option-columnTemplate
Title: Re: disable row edting
Post by: chirag on August 08, 2018, 02:10:16 pm
That's not work for me. I have conditions for each column for editable purpose. That will overwrite by column template. Please find screenshot.
Row with blue color are non editable but in that "Plan'18" column should be editable always.
Column with "ACT" header is always non editable at the same time and column with "LTF" header is in editable mode.
Title: Re: disable row edting
Post by: paramvir on August 09, 2018, 10:32:45 am
column.editable callback gets both row and column based parameters.

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

so move all your conditional row and columns based editable logic in a single editable callback and add it to columnTemplate.

Code: [Select]
columnTemplate: {
    editable: function (ui){
        //use row based conditions with ui.rowIndx or rowData.
        //and use column based conditions with ui.dataIndx 
    }
}