Get Sorted List

Get Sorted List

anakin59490anakin59490 Posts: 20Questions: 7Answers: 0

Hi,
I have the following dataTable :

When i use "Validation" button i get the all rows. Ok
But if i sort the list and i press "Validation", i get the rows without the sorting.

How can i do to get the list in the same order than displayed on screen ?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,300Questions: 26Answers: 4,945
    Answer ✓

    Are you using the rows() API to get the data?

    By default it should get the data in the sorted order of the table. Please show how you are getting the data.

    Kevin

  • anakin59490anakin59490 Posts: 20Questions: 7Answers: 0

    It's a bit complex so here are some explications :
    I generate a dynamic dashboard with one or many database
    Firstly I retrieve Json :

    Json is stored in listServices that have "Stats" structure:
    export interface Stats {
    'data': DataTable [];
    'service': string;
    'count': number;
    }
    export interface DataTable {
    headerRow: string[];
    footerRow: string[];
    dataRows: string[][];
    }

    my HTML

This discussion has been closed.