When I bind a datagrid there is one extra coulmn (automaticaly generated) on the right side. I tried to remove it through code but caught with an exception.
how to remove this extra coulmn?
You can set the column width (say you have one column) to wide enough:
<my1:DataGrid x:Name="DataGrid1" Width="500" Height="500" ColumnWidth="500" >
If you're using DataGridTemplateColumn:
If there're multipule columns you can set the width of the last column to a large value.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?