RadGridView Hearder Click

2 posts, 1 answers
  1. Rafael
    Rafael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 02 Dec 2015 Link to this post


    I need to do some action when the user clicks with the right button on the radgridview, but ignoring header clicks.

    How can I identify header clicks?


    PS: I'm using MouseClick event.

    Thank you.
  2. Answer
    Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4173 posts

    Posted 02 Dec 2015 Link to this post

    Hello Rafael,

    Thank you for writing.

    Here is a sample code snippet demonstrating how to detect mouse clicks over RadGridView excluding header cells:
    private void radGridView1_MouseDown(object sender, MouseEventArgs e)
        GridHeaderCellElement elementUnderMouse = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridHeaderCellElement;
        if (elementUnderMouse == null && e.Button== System.Windows.Forms.MouseButtons.Right)

    I hope this information helps. Should you have further questions I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top