了解了,C1DataGrid不支持直接通过代码来添加行,
你可以通过给源数据添加行来实现,建议尝试下面的代码
- ClientCollectionView c= (ClientCollectionView)dataGrid1.ItemsSource;
- c.Add(new TutorialsWPF.Employee() { EmployeeID = 100, FirstName = "Mark", LastName = "Brown", Title = "Developer" });
- dataGrid1.ItemsSource = c;
复制代码
|