Results 1 to 2 of 2

Thread: GroupingView always reloads items on groupBy

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Vote Rating

    Exclamation GroupingView always reloads items on groupBy

    What do you think about following listing?
    It allows me to set groupingColumn before Attach event.
    Also there are 2 issues with sorting in the original GroupingView:
    1. If Loader.remoteSort = false then I can't use eintities withoun Comparable interface implementation.
    2. If Loader.remoteSort = true then view will always load data from server automatically.

    public class MyGroupingView<T> extends GroupingView<T> {
        public MyGroupingView() {
        public MyGroupingView(
                com.sencha.gxt.widget.core.client.grid.GroupingView.GroupingViewAppearance groupAppearance) {
        public void groupBy(ColumnConfig<T, ?> column) {
            groupBy(column, true);
        public void groupBy(ColumnConfig<T, ?> column, boolean refresh) {
            if (column != groupingColumn) {
                  // set the new one
                  groupingColumn = column;
                  if (refresh && column == null) {
                      // full redraw without groups

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Vote Rating


    In order to group items, they must be sorted so the items in the same group are near each other - if the server is to be responsible for sorting, then it should to this work.

    That said, there is a change in SVN (and will be available in the next release) that allows for a custom Comparator to be defined for any ColumnConfig. And of course remember that a ColumnConfig that uses a child property and groups on that item doesn't need the entire entity to be Comparable, as it will only use that property to sort. The example at shows what the code, example looks like after this change.

    Thanks for the patch allowing GroupingView.groupBy to be called earlier - we have made a similar change in SVN already, but I will compare it with yours to see if it adds any additionally useful features.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts