row grouping

row grouping

Edleco01Edleco01 Posts: 7Questions: 2Answers: 0

https://jsbin.com/cepebet/edit?html,js,output
I am trying to group a table that I get from ajax, I put the html code for the example but it must come through ajax in json format but in the datable I want to group it by column 5 and column 6, and it is not doing anything

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954
    Answer ✓

    Your test case doesn't run. Since your data is objects not arrays you will need to reference the objects in the rowGroup.dataSrc. For example:

    dataSrc: ['modulo', 'padre'],
    

    Kevin

  • Edleco01Edleco01 Posts: 7Questions: 2Answers: 0

    Thank you very much, you don't know how much it has helped me

  • Edleco01Edleco01 Posts: 7Questions: 2Answers: 0

    Thanks to your answer I was able to make the following code and it works fine for me, but it is in a single level I would like to be able to do the next level in column 5 which is 'father'. every time I try it it fails me and tells me in the top column undefine.

    this is the code that works for me, : http://live.datatables.net/junuweki/1/
    as seen in the image below:

    but this does not work for me: https://jsbin.com/cepebet/edit?html,js,console,output
    but I want it to work multilevel
    but i want it to work with multilevel with 'modulo' and 'padre' column

    can you help me with this part or can someone help me, thank you very much in advance

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    You are using RowGroup 1.0.2. This is according to the rowGroup.dataSrc docs:

    As of RowGroup 1.1.0 it is possible to nest multiple levels of data by providing this parameter as an array of values.

    You will need to upgrade to a later version of RowGroup. You can use the Download Builder for this.

    Kevin

  • Edleco01Edleco01 Posts: 7Questions: 2Answers: 0

    @kthorngren any documentation or example to study it and implement it in my code?

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954
    Answer ✓

    Here is a multi level grouping example.

    Kevin

Sign In or Register to comment.