Datatable and Editor within an Editor

Datatable and Editor within an Editor

FurburgerFurburger Posts: 37Questions: 8Answers: 0

Hi Allan

I have a datatable in an Editor form (to show a child table).

(See attached image)

I tried creating an Editor for the datatable in the form (to edit the child table) but it doesn't seem to work. I get no console errors - the editor just doesn't load when you call editor.create().

I think it is because the original (parent) datatable (with its editor) is already in the DOM and I notice that you use generic classes in your code expecting there to be only one instance of that class - and now there are two.

Is this the case and, if so, do you have any suggestions or comments because we are developing a single page application and there will often be other datatables and editors in the DOM,

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I'm sorry to say that an Editor inside an Editor isn't possible at the moment. Fundamentally it is possible to have multiple Editor instances on a page, and they can in theory be functional at the same time, but the display controller (the modal) is the sticking point just now. There is only one modal that is shared between all of the Editor instances (in part this is due to limitations with the styling libraries - for example with Bootstrap you can't display multiple modals at the same time).

    Because of that limitation, some of the other code has been simplified, as you note, to use generic classes (mainly .DTE) rather than doing things on a per instance basis.

    This is most certainly a limitation in Editor that I plan to address in future versions, but I'm sorry to say there isn't a trivial way of making it work at the moment.

    Regards,
    Allan

This discussion has been closed.