Use data ordering on init
Use data ordering on init
![edika](https://secure.gravatar.com/avatar/a7544b75ad50749646ee599fb70336c7/?default=https%3A%2F%2Fvanillicon.com%2Fa7544b75ad50749646ee599fb70336c7_200.png&rating=g&size=120)
I'm trying to display the result of a search in a datatable and would like them to be displayed as they are provided in the data source, as they are already sorted by best match, based on the search parameters.
I tried removing the 'order' option but data is still sorted in ascending order in column[0].
Is there a way to prevent data from being sorted unless requested by the user?
Thanks
best regards
This question has an accepted answers - jump to answer
Answers
Set the
ordering
option to false. The table should then be displayed in the order the rows are received from the source.Kevin
Thanks kthorngern that's works, but remove the option to sort the table by columns. I want to leave this option to the user.
Is there a way to do that?
Set
order
to be an empty array if you want no default ordering, but still want the end user to be able to order the data when clicking on a column header.Allan
Thanks allan, this is the perfect solution