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.
↧