Page 1 of 1

Sort DataTable Programmatically

Posted: 25 Jul 2019, 16:49
by peaverok
How do I sort the datatable programmatically? I can see where I can set the sortField and sortOrder but those are just the default. How do I resort the table programmatically?

Re: Sort DataTable Programmatically

Posted: 10 Sep 2019, 14:03
by aragorn
I think you can use this.dt.filter method. Please see doc; https://www.primefaces.org/primereact/#/datatable

Code: Select all

value: the filter value
field: the filter field
mode: "startsWith", "contains", "endsWidth", "equals", "notEquals", "in" and "custom".
Best Regards,