C#WPF中选中语句如何换成WINFORM中的
请教在WPF中选中datagrid中记录行的语句,在WINFORM中如何用啊
Customer customer = (Customer)gridCustomers.SelectedItem;
if(customer==null)
{
MessageBox.Show("请选择要编辑的行!");
return;
}
在WINFORM中没有SelectedItem这个选项,要如何改写,
还有一个也是在WPF中 CustomerEditUI editUI = new CustomerEditUI();
editUI.IsInsert = true;
if (editUI.ShowDialog() == true)
{
LoadData();
}
editUI.ShowDialog() == true在winform中报错,要如何处理,请帮帮忙,非常感谢
------解决方案--------------------
是要在winform中获取选中行的数据?
------解决方案--------------------有SelectedRows