Row grouping and sorting

Row grouping and sorting

fedegirofedegiro Posts: 10Questions: 5Answers: 0
edited October 2016 in Free community support

Hi,
I'm working on a new project that have grids-tables and i'm testing DataTables to see if this plugin suits my needs.
Some of the tables in my project needs to have row grouping. I already saw the example at https://datatables.net/examples/advanced_init/row_grouping.html , but i need to know if there's a way to sort by column like in the example, but maintaining the location position in the grid (in a similar way jQgrid does simple grouping and sorting). For example, if i click in the "Position" header cell, i'm expecting that the nine items related to "Edimburg" do rearrange alphabetically but contiguous from each other. I mean, is it possible to sort the rows without breaking the groupings?
Sorry for my english.
Federico.

This question has an accepted answers - jump to answer

Answers

  • doganmehdoganmeh Posts: 4Questions: 1Answers: 1
    edited October 2016 Answer ✓

    I am nowhere expert in datatables, but I am curious if it would be possible to intercept the sorting event and insert the grouped column in to the (beginning of the) sort order
    to create a multi-sort as in this example. This is to keep the grouping column always as the very first column to sort.

  • fedegirofedegiro Posts: 10Questions: 5Answers: 0

    Well, i made a couple of tests... didn't find a solution... It seems that is more complicated than i thought.

    Anyway i just don't need the row grouping for the moment. Thank you.

This discussion has been closed.