[CLOSED] Order of grouped gridpanel rows

  1. #1

    [CLOSED] Order of grouped gridpanel rows

    I've noticed that if i use grouping in a gridpanel the grid is automatically ordered by the column i used to group.
    How to disable this behaviour? And what if i want to order by the group column, but descending instead of ascending?
    Last edited by Daniil; Sep 19, 2011 at 6:17 PM. Reason: [CLOSED]
  2. #2
    Sorting is required to build groups

    And what if i want to order by the group column, but descending instead of ascending?
    Use GroupDir property of Store
  3. #3
    I have to sort a month/year ('12/2008', '11/2010') column DESC... Tried to use the GroupDir and to define the record as String: the values are show, but are sorted incorrectly for my application logic. It sorts it correctly, since it thinks the values are strings - 12/2008 comes before 11/2010. But since for my application logic needs the values to be treeated as dates, it doesn't work for me.
    So i tried to define the record type as date... When i do this the values aren't even shown (they're shown as 'undefined').
    Tried also to define the column as a datecolumn and put the format 'MM/yyyy', without success (empty values are shown).

    What's the trick? Please, send an example...
  4. #4
    Hi,

    So i tried to define the record type as date... When i do this the values aren't even shown (they're shown as 'undefined').
    Do you defined Type="Date" for RecordField and bind string to this Field? If yes then you have to specify DateFormar for RecordField
    DateFormat="m/Y"
  5. #5
    Didn't work (value appears as 'none')...

    This is how my record is configured:
    <ext:RecordField Name="DOP_PERIODO" Type="Date" DateFormat="m/y" />
    And my column:
     <ext:DateColumn ColumnID="cPeriodo" Resizable="false" Header="PerĂ­odo" DataIndex="DOP_PERIODO"
     Width="60px" MenuDisabled="true" Sortable="false" Format="MM/yyyy" />
    Tried also to use a regular column instead of DateColumn, no success... What am i missing?
  6. #6
    If your string contains 4 digit year then need to use upper case 'Y'
    DateFormat="m/Y"
    Please provide test sample which demosnrates how all is configured
  7. #7
    Sorry, I was wrong, I specified ExtJS date formaters
    Need to use .Net formaters
    DateFormat="MM/yyyy"
  8. #8
    Problem with the date is ok.

    But i still need to use another column to order besides the column that is used to group...
    Like: i use column "A" for grouping... I understand that the items will have to be ordered by this column.
    But what if i also want to order the items using column "B" (like they would be shown if i used a query with "ORDER BY A, B")?

    Isn't there any way to do this? Or if i use grouping any other ordering that i try to use will be ignored?
  9. #9
    Any suggestion?
  10. #10
    I am not sure that clear understood what are you expecting (may be need to demonstrate it with a sample)
    Please note
    1. There is GroupOnSort property. If false (by default) then current sort info will be used for sorting inside groups (but groups will be sorted by group field)
    groupOnSort : BooleanTrue to sort the data on the grouping field when a grouping operation occurs, false to sort based on the existing sort info (defaults to false).
    2. There is GroupDir property
    groupDir : StringThe direction to sort the groups. Defaults to 'ASC'.
    3. If you need custom grouping then need to use RemoteGroup option
    remoteGroup : BooleanTrue if the grouping should apply on the server side, false if it is local only (defaults to false). If the grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call.
    Sample
    http://forums.ext.net/showthread.php...ll=1#post25707

Similar Threads

  1. [CLOSED] Order GridPanel Groups in an arbitrary order?
    By dmoore in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 27, 2013, 4:35 AM
  2. [CLOSED] GridPanel.Rows.Changing Background Color of Rows
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 01, 2012, 5:18 PM
  3. [CLOSED] Remove +- from grouped GridPanel
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 14, 2011, 2:59 PM
  4. [CLOSED] FocusRow() for grouped GridPanel within DirectMethod
    By csharpdev in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 10, 2010, 2:21 PM
  5. [CLOSED] GridPanel re-order rows
    By danielg in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 6:10 PM

Posting Permissions