1. #41
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    ah yes, you are putting the number of records in the group header text. Assuming it's working for you since your title now says [SOLVED]. I dropped in your groupTextTpl and it worked for me...although it may be a bit funny depending on what your data and grouping is actually setup to be.

    In other news:
    I've been working on better indention for multi-grouping, so as to give a tree-like hierarchy to a flat grid view. It's working fairly well, the only "issue" is that since the data is still flat, nested groups get cut off by the paging limits. It's not a true nested grid view, like the TreeGrid plugin or Ext 4's TreeGrid, so each inner grid doesn't ajax load as expanded. But it gives a nice visual appearance to hierarchical flat data none-the-less.

    nestedgrid.jpg

  2. #42
    Sencha Premium Member RonaldBrinkerink's Avatar
    Join Date
    Feb 2009
    Location
    Haaksbergen, Netherlands
    Posts
    38
    Vote Rating
    0
    RonaldBrinkerink is on a distinguished road

      0  

    Question eror improvement in MultiGroupingView?

    eror improvement in MultiGroupingView?


    @Tony

    Nice work. Could you share the code for the improved indentation? Would be nice.

    An issue I ran into:
    When using a renderer function an error is raised in this function when grouping on that column because the renderer function is called from within the doRender of MultiGroupingView.js when creatuing the curGroup object, without specifiying all parameters

    Code:
                    group: rndr ? rndr(grp.value) : groupOutput
                    , 
                    groupName: grp.dataIndex
                    , 
                    gvalue: rndr ? rndr(grp.value) : grp.value // AMA render the cell value
    I replaced them with

    Code:
                    group: rndr ? rndr(grp.value, {}, r, rowIndex, colIndex, ds) : groupOutput
                    , 
                    groupName: grp.dataIndex
                    , 
                    gvalue: rndr ? rndr(grp.value, {}, r, rowIndex, colIndex, ds) : grp.value // AMA render the cell value
    and it seems to wok now.

    Another issue I ran into is that after resizing the grid, part of it is not redrawn. No errors are thrown. The grid is an item in panel with an accordion layout, but it occurs in any layout.

    Selection_003.jpg

    Have you seen this behaviour before?

    Regards, Roanld

  3. #43
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    @Ronald
    I have not seen those resizing issues. What browser are you using? Have you tried forcing a call to grid.doLayout() to see if it fixes it? I know sometimes when I put a grid in a hidden tab its a little funny, but I just call doLayout on the tab's Change event.


    Other Updates:
    I'm not going to have any more time to maintain this project. I will be moving on to another endeavor. I'm in the process of putting some final touches on it and then I will re-release it one last time. I have re-integrated everyone's input from this thread already. I have been trying to clean up some documentation and a few css things. Look for it later this week.

  4. #44
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default MultiGrouping Grid and Summary for ExtJS 3.4 - v0.3

    MultiGrouping Grid and Summary for ExtJS 3.4 - v0.3


    Usual disclaimer: Use at your own risk, I'm not liable.


    For ExtJS v3.4, MultiGroupingPanel and Summary 0.3.zip

    - Community feedback included
    - Change default group template to only show colon if {text} exists
    - groupTextTpl: '{text}<tpl if="text"> : </tpl>{group}'
    - Inclusion of Array.contains(obj, testFunc) if one does not already exist
    - CSS and sizing fixes
    - More documentation
    - New MultiGroupingView config:
    - skipEmptyGroups : boolean true to stop rendering the list of group header text if one is null/empty.
    This is good when grouping on a series of columns that may not all contain data.
    Useful for making flat grouped data into a tree-like structure. (Default: false)


    I'll try to explain my reasoning behind the new config, skipEmptyGroups. I wanted to render a flat grid structure as more of a tree-like structure by using multi-grouping to define the depth of the tree. There were two issues I had to overcome:
    1) Creating a root group for each root level row, instead of having all the root level rows grouped together in one section.
    2) Each branch of the "tree" could potentially be different depths, so I needed a way to only render the group header down the grouping stack to where it existed.


    Example:
    In this example I have a max depth of 10 so I'm grouping on columns Code0 .. Code9. In order to get each root level row in its own section you have to group on a unique value for each one, so Code0 is some id/code unique to each row. Then in order to group each root level's children under itself you have to group Code1 on the SAME EXACT CODE0 VALUE again. This may be a little counter-intuitive at first but it will become clear as we go (see included screenshot). Code2 then becomes the grouping value of the second depth of children, and so on down to Code9 which is the 9th depth level grouping value. There is no reason to group on the leaf level value, since all children get grouped by their parent's code. So to get this feature working, there is obviously some server-side requirements to be met with how you build your db query.

    This now raised the question of rendering the grouping header text with variable depths. This is where the new view config parameter, skipEmptyGroups, comes into play. When true the view will only render the grouping stack down to the first empty CodeN value, then stop and pad out the rest of the header with an empty line. Only the parent level grouping column needs to have header text and by leaving off the header text of the other columns the separating colon will not be rendered either. Note, skipEmptyGroups config differs from displayEmptyFields. displayEmptyFields handles whether or not the emptyGroupText or "(none)" will be displayed if there is no grouping value.

    In my use case each of these grouping columns are hidden to the user (see code below) and all other columns having grouping disable. Only the first parent level column requires a header string and since it doesn't have a parent of its own you can just return a non-breaking char for the group renderer.

    Code:
    { dataIndex: 'Code0', hidden: true, hideable: false, groupable: true, header: 'Parent Projects', groupRenderer: function(){ return "&nbsp;"; } },
    { dataIndex: 'Code1', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code2', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code3', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code4', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code5', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code6', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code7', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code8', hidden: true, hideable: false, groupable: true },
    { dataIndex: 'Code9', hidden: true, hideable: false, groupable: true }
    multigroupingtree.PNG

  5. #45
    Sencha User
    Join Date
    Feb 2008
    Location
    Anywhere
    Posts
    15
    Vote Rating
    0
    w3bbuilder is on a distinguished road

      0  

    Default Problem grouping by all defined group by columns

    Problem grouping by all defined group by columns


    Hi,

    Does anyone have a working example of this extension? I don't know if my server side json is incorrect or i have a miss configuration issues of the store, view or grid.

    Thank you!

  6. #46
    Sencha User
    Join Date
    Nov 2012
    Posts
    1
    Vote Rating
    0
    Chris0_0 is on a distinguished road

      0  

    Default


    Hi,
    I have implemented this multigrouping grid in one of my projects. Whats your problem ?
    The only problem I have currently is that I could only group on one level ...where do I define the grouping levels ?

  7. #47
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    0
    rodo008 is on a distinguished road

      0  

    Default


    Gretting, i could get a complete example implementing this..
    Thanks!

Similar Threads

  1. How to set start/end TIME for Ext.calendar.CalendarPanel (Ext 3.3. beta)
    By omermx in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 8 Dec 2010, 12:21 PM
  2. How can we make groupField to be Selectable in Ext.ux.MultiGroupingPanel
    By ramana_l_v in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 Dec 2009, 4:47 PM
  3. Ext.nd Beta 1
    By RWaters in forum Ext.nd for Notes/Domino
    Replies: 12
    Last Post: 14 Feb 2008, 12:53 PM
  4. Ext 2.0 Beta 1 Now Available
    By ReyBango in forum Community Discussion
    Replies: 4
    Last Post: 12 Oct 2007, 6:04 AM
  5. [beta] Ext.ux.ItemSelector (part of Ext.ux.Multiselect v1.2)
    By tjstuart in forum Ext 1.x: User Extensions and Plugins
    Replies: 36
    Last Post: 20 Sep 2007, 3:42 PM

Thread Participants: 19