Hot to apply sorting for specific column when sorting is off?
Hot to apply sorting for specific column when sorting is off?
hgsadhrakiya
Posts: 17Questions: 5Answers: 0
I want to apply sorting for specific column, which will be static.
I want to do this when sorting is off.
For example,
My table have 4 columns.
Sorting is disabled because user should not apply sorting to it.
Now when the table loads, I want to sort the data according to 2nd columns descending order.
The only REASON to do this is, I want to display the Sorted Table by default.
Is this possible?
This discussion has been closed.
Answers
You can apply an "order by" to your SQL statement. Then data will load in the order specified in your SQL statement.
Hi glenderson ,
Thanks for your answer.
Yes I knew that we can do this with SQL.
But I just want to know if there is any option from DataTable for this.
Thanks again :)