Author Topic: How to lock(Non Editable) a row  (Read 3567 times)

Ekanta

  • Newbie
  • *
  • Posts: 17
    • View Profile
How to lock(Non Editable) a row
« on: August 26, 2016, 02:43:36 pm »
Hi All,

I have a requirement in that based on the value of the column i have to lock the entire row in the grid. I tried using below code but it is not working for me. Could you please help me in resolving the issue.

grid.pqGrid("removeClass", { rowIndx: validatedRowNums, cls: 'pq-row-edit' });

where validatedRowNums array will have row numbers to be locked.

Regards,
Ekantaraju  KG

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: How to lock(Non Editable) a row
« Reply #1 on: August 27, 2016, 09:56:22 am »
editable callback can be used to conditionally make the rows editable based on a column value.

http://paramquery.com/pro/api#option-editable

Ekanta

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How to lock(Non Editable) a row
« Reply #2 on: August 31, 2016, 04:41:02 pm »
Thanks for your help. This solution is worked. I want to apply the class disabled to that particular row. I am using below line of code but it is not working.

grid.pqGrid("addClass",{ rowIndx: rowIndx, cls: 'disabled' });

Basically I want to change the color of the rows to grey if rows are not editable.

Regards,
Ekanta