[Solved] Best way to track column width changes?

1 Answer 36 Views
GridView VirtualGrid
Jason
Top achievements
Rank 1
Jason asked on 05 Jun 2026, 09:27 AM

Hi,

I can see this is a little bit of a recurring question in the forums, but what is the latest best way of tracking user column width changes in RadVirtualGrid and RadGridView? We're interested in making the format of decimals displayed in the cells respond to the available width.

We're currently using 2025.1.211 but could upgrade if that helped.

Thanks in advance,

__Jason

Jason
Top achievements
Rank 1
commented on 05 Jun 2026, 02:51 PM

I think we are probably most interested in RadVirtualGrid.
Jason
Top achievements
Rank 1
commented on 05 Jun 2026, 02:51 PM

I'd also be interested in noticing a double-click in a column header in order to reset the column size to the default.

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 10 Jun 2026, 07:30 AM

Hello, Jason,

Tracking Column Width Changes in RadVirtualGrid and RadGridView:

Detecting Double-Click in Column Header

  • RadVirtualGrid does not have a built-in event specifically for double-clicking a column header. However, you can achieve this by attaching a MouseDoubleClick event handler to the header elements. In the event handler, check if the double-click occurred on a header, then reset the column width to your default value:
this.radVirtualGrid1.MouseDoubleClick += RadVirtualGrid1_MouseDoubleClick;

private void RadVirtualGrid1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
   // TO DO
}
  • You may need to use the grid's visual tree to attach this handler to the header elements during grid initialization.

At this moment, on double click the virtual grid can sort the rows automatically. We have another feature request logged for reset the column width, here you can find the feedback item: VirtualGrid: Allow auto-fit for the column headers on double click on the column resize handle

I hope this information is useful. If you have any other questions, please let me know.

        Regards,
        Nadya | Tech Support Engineer
        Progress Telerik

        Unlock smarter data exploration in RadGridView with AI-powered features. Enable natural language queries and help users uncover insights faster.

        Learn more about RadGridView AI features

        Tags
        GridView VirtualGrid
        Asked by
        Jason
        Top achievements
        Rank 1
        Answers by
        Nadya | Tech Support Engineer
        Telerik team
        Share this question
        or