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

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

CapamaniaCapamania Posts: 187Questions: 66Answers: 5
edited January 15 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: 49,321Questions: 1Answers: 7,239 Site admin

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

    Allan

Sign In or Register to comment.