angular-datatables icon indicating copy to clipboard operation
angular-datatables copied to clipboard

set default sort options for individual colmns

Open nizalsha opened this issue 2 years ago • 1 comments

:rocket: Feature request

Default sorting in individual columns.

I have data from the server, it is not in the right order, so I want to set the data in the table as sorted, need an option to set the sort ASC, DSC option for individual columns in dtoptions, it would be more helpful so can avoid lines codes to sort the data.

nizalsha avatar Jul 16 '22 06:07 nizalsha

Hi,

There is support for single column sort here.

~~However, setting order for individual columns is not supported by this library. As you might now, it's a wrapper around datatables.net jQuery plugin. You might have more luck with their forums.~~

You can use order option which accepts an array of columns with individual ASC or DESC values.

Reference: https://datatables.net/reference/option/order

shanmukhateja avatar Jul 16 '22 06:07 shanmukhateja

Closing this as response was not provided.

shanmukhateja avatar Aug 28 '22 03:08 shanmukhateja