Dt-2.0 api useage
Dt-2.0 api useage
jdadwilson
Posts: 127Questions: 30Answers: 1
The admin areas of my site uses the following structure...
Page Form
Table of records from Db
The usage scenario is...
1. Page 'ready' - Load table from Db and clear_Form() { reset_TableSort( oTable ); }
2. Select row from table - fill form with data
3. Update/edit form fields as needed
4. Submit form - update record in Db and clear_Form()
The problem occurs in the reset_TableSort function...
function reset_TableSort( thisTable ) {
// Remove highlight of selected row
thisTable.rows('.selected').nodes().to$().removeClass('selected');
// Set sort order to original order
thisTable.order.neutral().draw();
}
In v1.0 I could pass the current oTable value to the function. But with v2.0 this does not work. I've tried passing this.api()
reset_TableSort( this.api() );
but this throws an error... thisTable.order.natural is not a function
What do I need to change in the reset_TableSort function to make it work?
As always... TIA for your GREAT assistance
jdadwilson
This discussion has been closed.
Answers
Duplicate of this thread.
Kevin