New to Telerik UI for WPFStart a free 30-day trial

Prevent GridView Column Resize on Mouse Double-Click

Updated on Sep 15, 2025

Environment

Product Version2022.2 621
ProductRadGridView for WPF

Description

RadGridView column resizes, when a double-click is performed between the header cells.

Solution

  1. Add a new event handler for the PreviewMouseDoubleClick event of the GridViewHeaderCell element via the AddHandler method.

Add a new event handler for the PreviewMouseDoubleClick of the GridViewHeaderCell element

C#
    this.AddHandler(GridViewHeaderCell.PreviewMouseDoubleClickEvent, new MouseButtonEventHandler(OnPreviewMouseDoubleClick));
  1. In the new event handler, set the e.Handled property to true, if the e.OriginalSource is of type Border.

Prevent the PreviewMouseDoubleClick event from bubbling if the OriginalSource is of type Border

C#
    private void OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
    {
        if (e.OriginalSource is Border)
        {
            e.Handled = true;
        } 
    }
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support