Field Missing For Multiple Rows Editor

Field Missing For Multiple Rows Editor

BuiBunBuiBun Posts: 1Questions: 1Answers: 0

The field for my Editor is missing when I try to edit multiple rows:

This is my Editor Code:

editor = new $.fn.dataTable.Editor({
    table: '#myTable',
    fields: [{
         label: "My Name:",
         name: "Name"
    }]
});

So when users select multiple columns and click a CUSTOM button I will invoke

function onCustomButtonClick()
{
    var selectRows = $('#myTable').DataTable().rows('.selected');

    editor.title('Edit Name')
             .buttons ([{
                    "label": "Cancel",
                    "fn" : function () {editor.close();}
              },
              {
                    "label":"Submit",
                    "fn" : function() { //some codes}
              }])
              .edit(selectRows);              
}

However, the editor pop-up appears with the buttons and title correct but not the fields (My Name).
Things to Note:

  1. selectRows are correct
  2. myTable Row has that field with the exact name
  3. I am able to do it for SINGLE ROW, as in I put in an additional idSrc = 'Id' for my Editor. but I tried for the multiple rows, it still unable to bring out the field(My Name)

Can someone please help?

Answers

  • colincolin Posts: 8,033Questions: 0Answers: 1,349

    Something odd going on. Are you able to link to your page, please, so we can take a look? If that's not possible, are you able to modify this example to demonstrate the issue?

    Colin

Sign In or Register to comment.