Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16919 |

    Hi,

    Can somebody tell me what event is being fired when the user tries to sort a column? I could only find examples for WPF, but my app is not using WPF.

    I’m using version v2.0.50727

     

    thanx

    Imported from legacy forums. Posted by kozu (had 2131 views)

    User (Old forums)
    Member
    Post count: 23064

    There is the SortDirectionChanged event on the column class, and there is the Sorted event on the GridControl and DetailGrid classes.

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

    User (Old forums)
    Member
    Post count: 23064

    Thanks André.

    Is there an event that’s being fired before the actual sort takes place?

    Imported from legacy forums. Posted by kozu (had 436 views)

    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)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.