Home Forums WinForms controls Xceed Grid for WinForms Event for Column based sorting Reply To: Event for Column based sorting

User (Old forums)
Member
Post count: 23064

Yes there is one, and it’s called SortDirectionChanged, and it’s on Column.  In the event handler, you can verify the SortDirection property of the sender (the column) to be informed of the direction.

e..g.:

    private void Form1_Load( object sender, EventArgs e )
    {
      foreach( Column col in gridControl1.Columns )
      {
        col.SortDirectionChanged += new EventHandler( col_SortDirectionChanged );
      }
    }

    void col_SortDirectionChanged( object sender, EventArgs e )
    {
      Column col = sender as Column;
      Debug.WriteLine( col.SortDirection.ToString() );
    }

Imported from legacy forums. Posted by André (had 3436 views)