public static long[] GetSelectedID(PLBandedGridView gridView, string IDField) { if (gridView.GetSelectedRows() != null) { long[] ids = new long[gridView.GetSelectedRows().Length]; int i = 0; foreach (int index in gridView.GetSelectedRows()) { if (index > -1) { DataRow temp = gridView.GetDataRow(index); ids[i++] = HelpNumber.ParseInt64(temp[IDField]); } } return ids; } return null; }
public static List<DataRow> GetSelectedDataRow(PLBandedGridView gridView) { List<DataRow> rowList = new List<DataRow>(); if (gridView.GetSelectedRows() != null) { foreach (int index in gridView.GetSelectedRows()) { if (index > -1) rowList.Add(gridView.GetDataRow(index)); } } return rowList; }