none
How to remove the last coulmn of a datagrid ?

    Question

  • 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?

    Wednesday, March 26, 2008 9:35 AM

Answers

  • Hi:

      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:

      <my1:DataGridTemplateColumn Width="500">

      If there're multipule columns you can set the width of the last column to a large value.

    Regards

    Friday, March 28, 2008 12:25 AM