Unplanned
Last Updated: 20 Feb 2026 08:33 by ADMIN
Mike
Created on: 20 Feb 2026 07:52
Category: UI for WinForms
Type: Bug Report
0
RadGridView: Right-Click Child level of Hierarchy Grid header causes Unhandled Exception
After upgrading to the latest version of Telerik, whenever I right-click the header row of the child grid in a hierarchy grid (to go to column chooser).
1 comment
ADMIN
Nadya | Tech Support Engineer
Posted on: 20 Feb 2026 08:33

Hello, Mike,

Thank you for reporting this.

Please use the following workaround until we introduce an official fix for it:

//register the custom row behavior
BaseGridBehavior gridBehavior = RadGridView1.GridBehavior as BaseGridBehavior;
gridBehavior.UnregisterBehavior(typeof(GridViewTableHeaderRowInfo));
gridBehavior.RegisterBehavior(typeof(GridViewTableHeaderRowInfo), new CustomGridHeaderRowBehavior());

public class CustomGridHeaderRowBehavior : GridHeaderRowBehavior
{
    public override bool OnMouseDown(MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Right)
        {
            GridCellElement cell = this.RootGridBehavior.CellAtPoint as GridCellElement;

            if (cell != null)
            {
                if (cell.ViewTemplate != cell.MasterTemplate)
                {
                    // Cell is on the child template
                    return true;
                }
            }
        }
        return base.OnMouseDown(e);
    }
}

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.