rowReordering Plug-in: Call Row Drag & Drop plugin after the JSON object is loaded from the server
rowReordering Plug-in: Call Row Drag & Drop plugin after the JSON object is loaded from the server
Hello,
I am using ASP.net MVC and DataTables plugin which is configured to load rows via AJAX call (bServerSider: true & sAjaxSource: someUrl). I would like to combine it with rowReordering addon for drag and drop but I can not solve this problem:
When I initialise DataTables plugin and call reordering plugin [code]$('#myDataTable').dataTable().rowReordering();[/code] the reordering plugin according to Firebug is called before the JSON object is loaded from the server and the data are populated. When I don't load data for the table from the server, rowReordering is OK.
How can I call reordering plugin after the data for table are loaded from the server?
Thanks for helping.
Best regards,
Jan Nemec
I am using ASP.net MVC and DataTables plugin which is configured to load rows via AJAX call (bServerSider: true & sAjaxSource: someUrl). I would like to combine it with rowReordering addon for drag and drop but I can not solve this problem:
When I initialise DataTables plugin and call reordering plugin [code]$('#myDataTable').dataTable().rowReordering();[/code] the reordering plugin according to Firebug is called before the JSON object is loaded from the server and the data are populated. When I don't load data for the table from the server, rowReordering is OK.
How can I call reordering plugin after the data for table are loaded from the server?
Thanks for helping.
Best regards,
Jan Nemec
This discussion has been closed.
Replies
I suspect you will need to call it when the data has been retrieved from the server - this is done using fnInitComplete. For example (depending on how the rowReordering plug-in is written) you might be able to do:
[code]
fnInitComplete: function () {
this.rowReordering();
}
[/code]
Allan