Setting Max column width property through DataGrid

Aug 17, 2009 at 3:28 AM

 

Hi,
I am using following way to set the Item source of my datagrid. There are certain fields in the DataTable that are too long, therefore I want to set the maximum width of all the columns in the datagrid.
DataGrid.ItemSource = DataTable.DataView;
DataTable columns and DataTable structure are changed time to time.
Is there any way to set the maximum value for the column as a DataGrid property?
Thanks,
Hi,
I am using following way to set the Item source of my datagrid. There are certain fields in the DataTable that are too long, therefore I want to set the maximum width of all the columns in the datagrid.
DataGrid.ItemSource = DataTable.DataView;
DataTable columns and DataTable structure are changed time to time.
Is there any way to set the maximum value for the column as a DataGrid property?
Thanks,