datagridview get selected row code example
Example 1: c# datagridview selected row index
datagridview.CurrentCell.RowIndex
Example 2: qtableview get selected row
QModelIndexList indexList = yourTableView->selectionModel()->selectedIndexes();
int row;
foreach (QModelIndex index, indexList) {
row = index.row();
....
}