Home Forums WinForms controls Xceed Grid for WinForms Sorting event Reply To: Sorting event

User (Old forums)
Member
Post count: 23064

There is not Sorting event.  However, you can handle the MouseDown event, which is triggered before the sorting, and retrieve the column in the event handler.

e.g.:

    private void Form1_Load( object sender, EventArgs e )
    {
      foreach( ColumnManagerCell cell in columnManagerRow1.Cells )
      {
        cell.MouseDown += new MouseEventHandler( cell_MouseDown );
      }
    }

    void cell_MouseDown( object sender, MouseEventArgs e )
    {
      Debug.WriteLine( ( ( ColumnManagerCell )sender ).ParentColumn.SortDirection );     
    }
 

 

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