disabling editing of a column
disabling editing of a column
javismiles
Posts: 205Questions: 38Answers: 3
in Editor
Good day, In my tables I dont want to allow people to edit the userid field because its auto-increment and that would cause problems. I tried not to include it in the table but that gives trouble, so next option is to make it non-editable or invisible,
how can I make a column non-editable or invisible?
thanks a lot
This discussion has been closed.
Replies
https://editor.datatables.net/reference/api/disable()
Thank you very much for your help, I still couldnt make it fully work,
look, Im declaring multiple editors dynamically, if i use disable() , it works, it disables all the fields, but if i try to do what i need to do, to disable just 2 specific ones:
...................... etc, etc, etc
then it gives error:
"Uncaught TypeError: Cannot read property 'disable' of undefined"
its like it cannot recognize that specific field, which is absurd, im declaring them in the statement before, its that fieldobj object that contains them
I can only sure that there isn't a field called
userid
in the fields array (perhaps it isuserId
oruserID
?).However, I don't understand why you need to include it at all. If you look at this example you'll be able to see that there isn't a field explicitly defined for the id column.
Can you link to a test case showing that issue please.
Allan