The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

Replacement for store.groupby

  1. #1

    Replacement for store.groupby

    I'm updating some legacy code originally written with a much older version of Ext.Net.

    In one of the gridpanels in use, there is a set of buttons for altering the way that the displayed data is grouped (allowing for the user to pick one of 5 columns to group by, and hiding the ones not used).

    The javascript ode to accomplish the change in grouping is a switch-case structured as follows:

                switch (index) {
                    case 0: // Column1
                        App.StoreName.groupBy("Column1", true);
                        App.GridPanelName.getColumnModel().setHidden(0, true);
                        App.GridPanelName.getColumnModel().setHidden(1, false);
                        App.GridPanelName.getColumnModel().setHidden(2, true);
                        App.GridPanelName.getColumnModel().setHidden(3, true);
                    case 1: // Column2
                        App.StoreName.groupBy("Column2", true);
                        App.GridPanelName.getColumnModel().setHidden(0, false);
                        App.GridPanelName.getColumnModel().setHidden(1, true);
                        App.GridPanelName.getColumnModel().setHidden(2, true);
                        App.GridPanelName.getColumnModel().setHidden(3, true);
    It appears that there is no longer a "groupBy" method that applies that way. The examples site shows some examples of grouping, but not of changing which column the gridpanel or store are grouped by.

    What's the correct way to dynamically change the column that a store is grouped by with the current version of Ext.Net?
  2. #2
    Ok, so it appears that you just do this in the codebehind now, which is fine. I added a "features" section to the gridpanel with a groupingsummary, and the summary line at the end of each group is displayed.

    What I'm not seeing now is the text matching the grouped value in the collapsible header for each group. It appears from the example that the column value set in the groupheadertplstring for the groupingsummary should be displayed at the beginning of each group. I am dynamically setting that to {[columnname]} when switching groupby settings. I see that in the html markup, the value I expect to see is in the properties of the colapsible div in the data-groupname attribute, but it doesn't show up as header text inside the div.


Similar Threads

  1. [CLOSED] hideTabStripItem replacement
    By Z in forum 3.x Premium Help
    Replies: 2
    Last Post: Oct 26, 2015, 1:25 PM
  2. [CLOSED] Store client side .getSortState() replacement
    By vadym.f in forum 2.x Premium Help
    Replies: 2
    Last Post: May 01, 2013, 2:37 PM
  3. Replies: 2
    Last Post: Nov 06, 2012, 1:16 PM
  4. Replies: 1
    Last Post: Aug 21, 2012, 7:37 AM
  5. Replies: 6
    Last Post: May 26, 2009, 3:03 PM

Tags for this Thread

Posting Permissions