shorting with two column in grid by default

2 posts, 1 answers
  1. Ashish
    Ashish avatar
    2 posts
    Member since:
    Jan 2013

    Posted 16 May 2013 Link to this post

    Hi Team,
    I want by data is loaded by default shorted with according to two column in grid means combination of two column  shorting. how it is possible please help me.

    Regards
    Ashish
  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 18 May 2013 Link to this post

    Hello,

    In order to accomplish this, you will need to add multiple SortDescriptors, please take a look at the documentation link.

    var descriptor1 = new SortDescriptor();
    descriptor1.PropertyName = "Column1";
    descriptor1.Direction = ListSortDirection.Ascending;
     
    var descriptor2 = new SortDescriptor();
    descriptor2.PropertyName = "Column2";
    descriptor2.Direction = ListSortDirection.Descending;
     
    this.radGridView1.SortDescriptors.Add(descriptor1);
    this.radGridView1.SortDescriptors.Add(descriptor2);

    Best Regards,
    Emanuel Varga MVP


  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top