日期:2014-05-17 浏览次数:21177 次
DataGrid grid = new DataGrid();
DataGridTextColumn column = new DataGridTextColumn();
//列序号
column.DisplayIndex = 0;
//属性名称
column.Binding = new Binding("属性");
//表头
column.Header = "";
grid.Columns.Add(column);
DataGridComboBoxColumn column = new DataGridComboBoxColumn();
DataGridCheckBoxColumn .....
//设置完列,设置数据源
grid.ItemsSource=xxx