In C# Dev, GridControl_gridview selects a row to delete and read data

The GridControl tool in C# Dev selects a row to delete and read data

1. Obtain the writing method of a row of data selected by the GridControl tool 1

 //GridView:对应GridControl工具中GridView修改名字
int handle = gridView_equ_relation.FocusedRowHandle;
if (handle >= 0)
{
     DataRow list = gridView_equ_relation.GetDataRow(handle);
}

2. Check Delete Selected Rows

 int selected_row_index = gridView_equ_relation.FocusedRowHandle;
            gridView_equ_relation.DeleteRow(selected_row_index);

3. Obtain the writing method of a row of data selected by the GridControl tool 2

//GridView:对应GridControl工具中GridView的修改名字
int[] intArray= gridView_equ_relation.GetSelectedRows();
if (Otherrow.Length > 0)
{
     DataRow Otherrows = ((DataRowView)gridView_equ_relation.GetRow(Otherrow[0])).Row;
}

Guess you like

Origin blog.csdn.net/txwtech/article/details/129834827
Recommended