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

New Post: DataGridControl AutoCreateColumns Auto-Size Columns

$
0
0
I'm using DataGridControl with AutoCreateColumns = true and ItemsSource Bound to an ObservableCollection<MyItemViewModel>. The Column widths generated are just a little narrower than what they need to be (even for the initially visible items). When I Bind the same Property to a .NET DataGrid's ItemsSource, all the Columns are auto-sized appropriately to just fit the widest values. How do I get the Column widths to auto-size. I've tried calling GetFittedWidth in the DataGridControl.ItemsSourceChangeCompleted Event (to use it to set Column.Width), it's returning -1. I've commented on a Xceed.Com Forum post (started 9/11/08 on this topic at "https://xceed.com/forums/topic/Column-autosize-to-content/") saying the last 3 Links posted as possible answers are broken, but I've not received a response.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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