Can Editor dialogs (easily) be used from outside DataTables (from a menu in a graph)?

Can Editor dialogs (easily) be used from outside DataTables (from a menu in a graph)?

Marcel Hoog AntinkMarcel Hoog Antink Posts: 9Questions: 3Answers: 0

Hi, I use Datatables and Editor for a while now.
It's working great.
Now I want to edit a datatable row from outside a table. I Have a graph in which i created a contextmenu. In the menu I know the datatable and the record ID. Now I want to edit this row from this menu with the same dialog as created and used in the standard Datatables and Editor.
Is this possible ??

Answers

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

    Absolutely - use the edit() method to trigger editing via the API.

    Allan

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    You can use the edit() API.

    Kevin

  • Marcel Hoog AntinkMarcel Hoog Antink Posts: 9Questions: 3Answers: 0
    edited December 2021

    Hi Kevin, Allan,

    Thanks for the quick responce.
    I tried , but I get stuck.

    Situation is:

    On the actual page there is not a DataTable, there is just a graph with information of the data. (On another page the DataTable with all the functions (including Editor) is available.) In the graph, I created a function that reads the actual data of the clicked item form the database (with ajax) using the ID available in the graph.
    Editing the item from this graph should be exactly the same as editing it form the actual Datatable (on the other page), so i would like to use the Editor settings.
    In the code, I see that the editor tries to get options of the datatable (serverside setting) but these are not avialable here.
    How can I manage using the Edtor without a Datatable avialable?

    regards,

    Marcel

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    See if this Standalone Editor example helps.

    Kevin

Sign In or Register to comment.