Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: DataGridControl AutoCreateColumns Auto-Size Columns

$
0
0
Hi,
  1. I was doing the workaround in the Loaded event, which is called only once, so if you change the DataGridControl.ItemsSource, you also need to add the workaround in ItemsSourceChangeCompleted event handler...as you do.
  2. If the sample application is working but the production application is not, there must be something you do in the production application that is different. You should try to see when the items are added to the DatagridControl and do the workaround at that moment. Its like if your production app is postponing the items addition into the DataGridControl.
  3. The workaround is necessary because the DataGridControl is using a BeginInit()/EndInit() initialization, which occurs slightly after the Loaded event.
    The DataGridControl is the only WPF datagrid that provides a rich, fluid and high performance user experience. It includes an advanced smooth scrolling and zero-lag data virtualization.
    Lets say you have 100 000 items in the DatagridControl, only the visible ones will be processed and displayed. The others will be virtualized. The DataGridControl includes special algorithms to enabled a fast scrolling with this special virtualization. Even if you set a fitted Width for columns, after scrolling to the 50 000th item, you may end up with not fitted columns since you measured them a while ago. Same thing if you group and the visible items are modified.
    We do not want to slow down the process by calculating the width of all visible cells at each scrolling/grouping/sorting/other option. We do not know the size of each cell from the 100 000 items. So a default width of 125 is used, and you can set the width you want for every column if its not good for you.
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>