Editor buttons - How to disable columns in a multiselect edit button?
Editor buttons - How to disable columns in a multiselect edit button?
I use select and have a collection button ... where I call the edit function to edit the selected records like this:
...
{
extend: 'collection',
text: 'Select',
buttons:
{
extend: 'selectRows',
text: 'Select Rows'
}, {
extend: 'selectNone',
text: 'Deselect All'
}, {
extend: 'edit',
text: 'Edit selected',
action: function ( e, dt, node, config ) {
var rows = table_books.rows( '.selected' );
rows
//.disable( 'books.name' )
.edit({
title: 'Edit Records',
buttons: [
...
]
});
}
}]
}
...
In general it works ... but when I want to disable a column ... //.disable( 'books.name' ) ... I'm getting:
console error:
TypeError: rows.edit(...).disable is not a function
What am I missing? And how to disable columns in a multiselect edit button?
This discussion has been closed.
Answers
The error is correct - there is no
rows().disable()
method. Do you meanfield().disable()
which is an Editor method?Allan