This is a migrated thread and some comments may be shown as answers.

Problem with column width/layout when Grid.ItemSource is rebound

5 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 12 Jul 2011, 08:15 PM
using version 2011 Q1
I have a window with a tree view and a grid
when I change the selected item in the tree i run query, build an ObservableCollection and bind it to the ItemSource of the grid.
all grid columns are Width="Auto"
the problem is that when i rebind the ItemSource, the width of columns don't update correctly, actually they don't update at all.
sometimes a column in the the resulting collection has 200 characters at most, other times 25 characters at most.
the columns width does not re size to correctly to 25 characters, it is left at 200 characters, the columns have too much white-space.
is the grid not supposed to do update the columns when the ItemSource gets a new collection?
if not how can I force the columns to adjust to current data collection.
as in one of your examples i have tried to iterate the grid.Columns setting the width to Auto, nothing happened.

your help would be much appreciated.
thanks






5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Jul 2011, 06:48 AM
Hi,

 Can you try Q1 2011 SP1 instead? Later Today we will release our Q2 - if you want you can try it directly. 

Greetings,
Vlad
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
John
Top achievements
Rank 1
answered on 13 Jul 2011, 08:01 PM
Updated to 2011 Q2 and the problem still exists.

I have created a sample application that has the same problem.

Sample Application

My current application is a WinForm application hosting the RadGridView.

thanks again.

0
Yordanka
Telerik team
answered on 15 Jul 2011, 11:13 AM
Hello John,

Thank you for the sample application.
This is a know issue and it has been logged in our PITS system. You can track its progress by following ID1630.
 
Greetings,
Yordanka
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Kevin Y
Top achievements
Rank 1
answered on 26 Jan 2012, 04:50 PM
This problem still exists in the RadControls for WPF Q3 2011 (Runtime Version v4.0.30319, Version 2011.3.1220.40).  I updated the SampleApplication and found the column widths did not change.
0
Yordanka
Telerik team
answered on 31 Jan 2012, 03:54 PM
Hi Kevin,

The PITS issue with ID1630 has been resolved. It seems that the case in the referenced application is a little bit different - the ItemsSource is rebound. We will do our best to address this problem in one of the next internal builds.
 
Greetings,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Vlad
Telerik team
John
Top achievements
Rank 1
Yordanka
Telerik team
Kevin Y
Top achievements
Rank 1
Share this question
or