1. #1
    Sencha User JamieMason's Avatar
    Join Date
    Apr 2010
    Location
    Leeds, UK
    Posts
    42
    Vote Rating
    0
    JamieMason is on a distinguished road

      0  

    Default DRY way to set default sort direction to DESC?

    DRY way to set default sort direction to DESC?


    I know that you can set the sortDir property on an Ext.data.field instance, but is there a way to override this value across the board?

    After nothing working I've then thrown all kinds of variations (below) at it, but when clicking a grid column header, the first sort is always ASC. I'll be missing something obvious, what is it?

    Code:
    Ext.data.Field.override({
      sortDir: 'DESC'
    });
    
    
    Ext.data.Field.sortDir = 'DESC';
    
    
    Ext.data.Field.addStatics({
      sortDir: 'DESC'
    });
    
    
    Ext.data.Field.implement({
      sortDir: 'DESC'
    });
    
    
    Ext.util.Sortable.override({
      defaultSortDirection: 'DESC'
    });
    
    
    Ext.util.Sortable.defaultSortDirection = 'DESC';
    
    
    Ext.util.Sortable.addStatics({
      defaultSortDirection: 'DESC'
    });
    
    
    Ext.util.Sortable.implement({
      defaultSortDirection: 'DESC'
    });

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
    KevinHanson is on a distinguished road

      0  

    Default me too

    me too


    [bump] plus

    I've got the same question, only I only need it for a specific column of a specific grid. I've tried just about everything I can find and yet the first click of the column header is still always sorting 'ASC'.

    Can anyone help??

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