开发者

DataGrid in WPF 3.5

开发者 https://www.devze.com 2023-01-19 15:38 出处:网络
How do I 开发者_开发技巧add a Column to a DataGrid in WPF?If you\'re talking about programatically, you can do this:

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

精彩评论

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