person

person

  • NA
  • 96
  • 0

DataGrid WPF

Sep 3 2009 9:58 AM
Hi.

Is it possible to refer to specific columns in  DataGrid  in the same way as is done in a Grid? I.e. Grid.Column="1" Grid.ColumnSpan="2".
So is there a way of doing - -----  DataGrid.Column="2" etc

For a simple example------

<dg:DataGrid>
              <dg:DataGrid.Columns>
                        <dg:DataGridTemplateColumn />
                        <dg:DataGridTemplateColumn />
                        <dg:DataGridTemplateColumn />
              </dg:DataGrid.Columns>
 
              <TextBlock dg:DataGrid.Column="0" dg:DataGrid.ColumnSpan="2" Text="Hello"/>
              <TextBlock dg:DataGrid.Column="3" Text="Goodbye"/>
</dg:DataGrid>


Thanks in advance.

Urema.

Answers (2)