Freeze a row from Editing
Freeze a row from Editing
galaxesolutions
Posts: 13Questions: 3Answers: 0
in Editor
I need to prevent a row from inline editing based on a data that is not displayed in grid, but available internally from ajax binding. Meaning some rows will be editable and some rows cannot be editable. The columns has different edit fields like dropdowns, checkbox list, text box etc.
This discussion has been closed.
Answers
Are you using a
click
event handler to call theinline()
method? If so, you could put anif
condition around that call that would check the hidden data to see if the cell should be editable or not.Allan
Yes, but I can access the hidden data only by using "full" keyword which is not available in click eventhandler. Is there any method provided by editor/datatable to access the data value for given row regardless of which column is being clicked.
I managed to do it as below
Yes, you would want to use
row().data()
to get the data for the current row. Depending on the exact code you are using,table.row( this ).data()
is normally much easier than using a private property (the leading underscore indicates that it should be treated as private).Allan
I hope your recommendation helped galaxesolutions because I too was looking how to solve this problem and your advice helped me. )