Editor buttons - How to disable columns in a multiselect edit button?

Editor buttons - How to disable columns in a multiselect edit button?

CapamaniaCapamania Posts: 229Questions: 79Answers: 5
edited January 2019 in Editor

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?

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    The error is correct - there is no rows().disable() method. Do you mean field().disable() which is an Editor method?

    Allan

This discussion has been closed.