Unplanned
Last Updated: 25 Nov 2024 12:24 by erwin
erwin
Created on: 25 Nov 2024 11:30
Category: GridView
Type: Bug Report
1
RadGridView: BestFitColumns() does not update the columns size
Calling the BestFitColumns() method after setting the DataSource will not resize the columns. The method logic is called before the internal measure of the control is finished. 
2 comments
erwin
Posted on: 25 Nov 2024 12:24
This is a regression Bug in 2024 Q4. In 2024 Q3 it works as expected.
ADMIN
Dinko | Tech Support Engineer
Posted on: 25 Nov 2024 11:40

Hello Erwin,

Thank you for reporting this behavior. As a workaround, you can call the following methods to force redraw the control.

radGridView1.DataSource = dt;         
radGridView1.BestFitColumns();
radGridView1.GridViewElement.InvalidateMeasure(true);
radGridView1.GridViewElement.UpdateLayout();

Regards,
Dinko | 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.