private uint[] GetSelectedInvoiceIDs() { int[] indexes = gridViewInvoices.GetSelectedRows(); uint[] ids = new uint[indexes.Length]; InvoiceCatalogModel[] rows = new InvoiceCatalogModel[indexes.Length]; for (int i = 0; i < indexes.Length; i++) { ids[i] = (gridViewInvoices.GetRow(indexes[i]) as InvoiceCatalogModel).InvoiceID; } return(ids); }
private void gridViewInvoices_CellValueChanging(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { if (e.Column.Name == col_IsConfirmed.Name) { InvoiceCatalogModel row = gridViewInvoices.GetRow(e.RowHandle) as InvoiceCatalogModel; if (row != null) { bool value = Convert.ToBoolean(e.Value); this.Manager.UpdateIsConfirmed(row.InvoiceID, value); } } }