DataGrid.ColulmnWidth issue

Dec 11, 2008 at 8:56 AM
Hi, all

if I set ColumnWidth to the DataGrid when it loads, that works.

but when I using a bing below:


<ComboBox Grid.Row="1" SelectedItem="{Binding Path=ColumnWidth, ElementName=dataGrid}">






then I select different item in the comboBox, I find that each column's width doesn't change,

Thanks for your help.

Dec 18, 2008 at 8:28 PM
This is actually a limitation of the DataGrid framework where column width values are set locally after initialization.  So setting DataGrid.ColumnWidth will only work on initialization of the DataGrid.