jQWidgets Forums

jQuery UI Widgets Forums DataTable Grouping: Reordering Issue

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Brandon 10 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Grouping: Reordering Issue #59877

    Brandon
    Participant

    Greetings,

    I’m attempting to build a relatively simple grouped table, but have come up against a strange issue in which the columns from the data source are haphazardly reordered. I can’t tell if this is a sort of bug in the software, something I’m doing incorrectly, or if something is odd with my data.

    I’ve recreated the issue for the most part here: http://jsfiddle.net/mzw2jzvy/4/

    Simplified, as my own code has quite a few more columns and non-negligible numeric values.

    All the data I’d like to present is appearing and the groups are preserved, but the row order appears to be unpredictable. In most cases this wouldn’t be an issue, but since my data will contain a row totaling up each column’s numbers, it’s important that the rows be rendered in the correct order.

    Thank you in advance.

    Grouping: Reordering Issue #59880

    Peter Stoev
    Keymaster

    Hi Brandon,

    The Grouping is not necessary to keep the order. It groups the data and displays it in groups. If you need to order the columns you can enable Sorting feature. Another possible approach is to display your Totals within the Groups Header Rows by using custom rendering function. Ex: http://jsfiddle.net/jqwidgets/xF7U9/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Grouping: Reordering Issue #59917

    Brandon
    Participant

    Peter,

    Thanks for the reply. However I may have neglected to communicate a few points.

    My example was perhaps a bit over-simplified. In my actual use case, I have a set of data in which there is one common property (column1) by which I’d like to establish groups. In these groups I have several pieces of data to present. One string (column2), and numerous numbers (column3-columnN). In the example I’ve shrunk this down to one extra column, but in reality there are between 15 and 20 columns to the right of the string.

    The data coming in will include a row totaling up each numeric column for each group, and since it’s important that the ‘Totals’ row appear at the bottom of each group, this apparent arbitrary reordering of the data within groups is problematic. Also why, unfortunately, enabling the sortable feature will not solve my problem.

    The only thing I’ve noticed is that it doesn’t seem to happen until there are a minimum number of total rows in the source data, but beyond that I can’t identify a pattern.

    Thanks for your consideration,
    – Brandon

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.