Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Dropdown menu in datatable not working


I currently use the dropdown menu "actions" used to show a dropdown menu (https://preview.keenthemes.com/keen/demo1/apps/user-management/users/list.html).

When using C# to show data in the datatable, everything works fine. But, I currently need to use javascript to get data and this is why I use jQuery. I inserted the HTML into the columns attribute. The "actions" button appear, with all the HTML, but the trigger 'click' is not working.

Per my understanding, there must be an action that is called before I return the data.

Can anyone knows more about this problem?


Text formatting options
Submit

Replies (1)


Hi Martin Maheux,

I guess that you are rendering content of the page asynchronously. Since our component is initialized on first-page load but content of your datatable renderers asynchronously you need to recall KTMenu.createInstances();, after content was rendered.

You can call this function inside datatable 'draw' event.


datatable.on("draw", function () {
KTMenu.createInstances();
}


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Text formatting options
Submit