Home Forums WinForms controls Xceed Grid for WinForms Click event on column header

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

    When someone clicks on a column header, I want to do something.

    How do I assign an event to a column header?

    Imported from legacy forums. Posted by Robert (had 1779 views)

    User (Old forums)
    Member
    Post count: 23064

    Subscribe to the Click event of the ColumnManagerRow.Cells collection.

    e.g.:
    <code>
    private void Form1_Load(object sender, System.EventArgs e)
    {
    foreach( Cell cell in columnManagerRow1.Cells )
    {
    cell.Click += new EventHandler(cell_Click);
    }
    }

    private void cell_Click(object sender, EventArgs e)
    {
    System.Diagnostics.Debug.WriteLine( sender.ToString() + ” click” );
    }
    </code>

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

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