How do you make several columns in table view readonly when you have inline editing enabled?
How do you make several columns in table view readonly when you have inline editing enabled?
rmeetin
Posts: 100Questions: 24Answers: 1
Is there a way to make several columns read-only in table view using columnDefs or other? Something like:
{ targets: [ 1,2,3 ],
render: 'readonly';
}
or
{ targets: [1,2,3],
render: function( data, type, row ) {
return something;
}
},
This discussion has been closed.
Answers
Is this using inline editing? If so, it would be jQuery selector used there that would determine if it's readonly. You could add styling to show that with
columns.className
,Colin
$('#example').dataTable( {
"columnDefs": [
{ className: "my_class", "targets": [ 2,3,5,6 ] }
]
} );
I see this but how do you make it read-only?
As I mentioned, you would use the selector for inline editing, see here,
Colin