How do I add a Column to a DataGrid in WPF?
+1
A:
If you're talking about programatically, you can do this:
DataGrid.Columns.Add(new DataGridTextColumn());
Or XAML
<DataGrid Height="148" HorizontalAlignment="Left" Margin="12,21,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="225" />
You will probably be best served by checking out a tutorial on WPF DataGrids.
Also, here's a tutorial on how to
Add Controls to a DataGrid at Runtime
Robert Greiner
2010-10-07 15:26:19