BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
GridRangeInfoList ranges = this.grid.Selections.GetSelectedRows(true, false); foreach(GridRangeInfo range in ranges) { for(int i = range.Top; i <= range.Bottom; ++i) { string value_Col1 = grid[i, 1].Text; Console.WriteLine(string.Format("Row {0} selected - value in col1: {1}", i, value_Col1)); } }
int row = this.grid.CurrentCell.RowIndex;
If you are using a ListBoxSelectionMode = One, then you can get the row with code like:
int row = this.grid.Selections.GetSelectedRows(true, false).ActiveRange.Top;
CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember];
int pos = this.grid.Binder.RowIndexToPosition(gridRowIndex);
DataRowView drv = (DataRowView)cm.List[pos];