DataGrid in WPF 3.5
How do I 开发者_开发技巧add a Column to a DataGrid in WPF?
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
精彩评论