C#的Dev中GridControl工具选中一行删除与读取数据
1.获取GridControl工具选中一行数据的写法1
//GridView:对应GridControl工具中GridView修改名字
int handle = gridView_equ_relation.FocusedRowHandle;
if (handle >= 0)
{
DataRow list = gridView_equ_relation.GetDataRow(handle);
}
2.选中删除选定行
int selected_row_index = gridView_equ_relation.FocusedRowHandle;
gridView_equ_relation.DeleteRow(selected_row_index);
3..获取GridControl工具选中一行数据的写法2
//GridView:对应GridControl工具中GridView的修改名字
int[] intArray= gridView_equ_relation.GetSelectedRows();
if (Otherrow.Length > 0)
{
DataRow Otherrows = ((DataRowView)gridView_equ_relation.GetRow(Otherrow[0])).Row;
}