开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜