1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    80
    Vote Rating
    0
    ajmPal is on a distinguished road

      0  

    Question GroupingView Header

    GroupingView Header


    Is there any way to modify the header of the GroupingView of a grid ?
    Can more than the group field be included ?

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    You can use the groupTextTpl to customize the group display.

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Posts
    80
    Vote Rating
    0
    ajmPal is on a distinguished road

      0  

    Default


    I see the
    Code:
    groupTextTpl: '<input class="grpCheckbox type = "checkbox"> 
                           {text} ({[values.rs.length]} {]values.rs.length > 1 ? "Files" : "File"]})
                       </input>'
    But it looks like the {text} portion is relegated to the field you are grouping by.
    Is there any way to get other data from the grid into that {text} element ?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    "values.rs" contains all the records in the current group, from which you can extract other data.

  5. #5
    Sencha User
    Join Date
    Jul 2008
    Posts
    80
    Vote Rating
    0
    ajmPal is on a distinguished road

      0  

    Default


    But how can I get the values.rs data into the {text} variable ?
    If I have a grid that contains these columns:
    Code:
    columns: [
    {header: 'COL A', width: 90, dataIndex: 'colA', sortable: true},
    {header: 'COL B', width: 90, dataIndex: 'colB', sortable: true},
    {header: 'COL C', width: 90, dataIndex: 'colC', sortable: true},
    {header: 'COL D', width: 90, dataIndex: 'colD', sortable: true}
    ],
    How can I get COL A, COL C and COL D put into the grouping header ?

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    But these columns can have diferent values for records in the same group. Or are col A, C and D linked to the group column?

    Code:
    groupTextTpl: '{text} {[values.rs[0\].data.colA]} {[values.rs[0\].data.colC]} {[values.rs[0\].data.colD]}'

  7. #7
    Sencha User
    Join Date
    Jul 2008
    Posts
    80
    Vote Rating
    0
    ajmPal is on a distinguished road

      0  

    Default


    Thanks, that's exactly what I was looking for. Is that information anywhere in the documentation ? I would have never figured that out.

    Thanks again.

    -Tony

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    1. The GroupingView docs should contain the available information for the tpl somewhere.
    2. To see what you can do with a tpl have a look at the Ext.XTemplate docs.

Similar Threads

  1. Is there a way to get contextmenu on GroupingView's group header?
    By crandes in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 18 Mar 2009, 9:51 PM
  2. Grid GroupingView header with DnD
    By sseema in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 15 Feb 2009, 8:48 PM
  3. How customize the GroupingView Header
    By mnardi in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 13 Feb 2009, 12:42 AM
  4. GroupingView Group Header
    By mustang in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 1 May 2008, 8:15 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar