[CLOSED] Change GridPanel SortInfo from code behind

  1. #1

    [CLOSED] Change GridPanel SortInfo from code behind

    I've tried this:

            grid.Store.Primary.SortInfo.Field = "somefield"
            grid.Store.Primary.SortInfo.Direction = Ext.Net.SortDirection.DESC
    But it still uses the default sorting that's defined in the markup. Any way to do this?
    Last edited by Daniil; May 17, 2011 at 1:59 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use
    Store1.SetDefaultSort("field", Ext.Net.SortDirection.ASC);
  3. #3
    I've found that this also works:

    Store1.Sort("field", Ext.Net.SortDirection.ASC)
    What's the difference?
  4. #4

Similar Threads

  1. Replies: 2
    Last Post: May 24, 2012, 8:33 AM
  2. Store.OnRefreshData and SortInfo
    By Awrong in forum 1.x Help
    Replies: 1
    Last Post: Dec 30, 2009, 6:04 AM
  3. Setting SortInfo dynamically
    By lionelhutz in forum 1.x Help
    Replies: 4
    Last Post: Oct 06, 2009, 10:35 AM
  4. PagingMemoryProxy doesn't obey SortInfo
    By shaun in forum 1.x Help
    Replies: 8
    Last Post: Jul 29, 2009, 2:48 PM
  5. [CLOSED] SortInfo tag in Store
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 17, 2008, 7:39 AM

Posting Permissions