[CLOSED] Equivalent of clearHeaderSortState()?

  1. #1

    [CLOSED] Equivalent of clearHeaderSortState()?

    Hi,

    What's the equivalent of and best practices for the following code block in v3.2? It's supposed to remove data from the Store and completely reset any sorting applied to it.

    var grid = App.MyGrid;
    grid.getStore().removeAll();
    delete grid.getStore().sortInfo;
    // This function doesn't exist in v3.2
    grid.getView().clearHeaderSortState();
    Last edited by Daniil; Sep 21, 2015 at 3:25 PM. Reason: [CLOSED]
  2. #2
    Hi Vadym,

    This should be an equivalent.
    var grid = App.GridPanel1,
        store = grid.getStore();
    
    store.removeAll();
    store.getSorters().removeAll();
    grid.getView().headerCt.setSortState(); // This updates UI
  3. #3
    Thanks, Daniil, it works. While we're at it, what's the call(s) to reset the Grid columns on the client i.e. restore their original order and visibility? Should I open a new discussion thread, perhaps?
  4. #4
    Yes, I think a new thread would be better.
  5. #5
    I believe what I needed to reset GridPanel columns was a server call to .Reconfigure(). I'm good for now. :)

Similar Threads

  1. [CLOSED] Equivalent of ToolbarLayout?
    By vadym.f in forum 3.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 15, 2015, 11:43 AM
  2. [CLOSED] MVC ValidationSummary equivalent in Ext.Net v2.2
    By ViDom in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 21, 2013, 1:02 PM
  3. [CLOSED] BodyStyle equivalent in CSS
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 19, 2012, 1:32 AM
  4. [CLOSED] Equivalent for css class in ie8-9
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 05, 2012, 1:33 PM
  5. [CLOSED] 'div' equivalent in ext.net?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 06, 2011, 6:03 PM

Tags for this Thread

Posting Permissions