private void RemoverRenglonDelGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV) { var lstDoctosPV = (List<DoctosPV>)(Grid.DataSource); if (lstDoctosPV.Count > 0) { int i = GV.GetSelectedRows()[0]; DoctosPV retiro = (DoctosPV)GV.GetRow(i); lstDoctosPV.Remove(retiro); Grid.DataSource = lstDoctosPV; GV.RefreshData(); } }
private void AgregarRenglonAlGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV) { var lstDoctosPV = (List<DoctosPV>)(Grid.DataSource); if (lstDoctosPV.Count >= 0) { DoctosPV doctos = new DoctosPV(); doctos.CajaID = 0; doctos.NombreCaja = "Concepto " + (lstDoctosPV.Count + 1); doctos.Neto = 0; doctos.Impuesto = 0; lstDoctosPV.Add(doctos); Grid.DataSource = lstDoctosPV; GV.RefreshData(); } }
private void AgregarRenglonAlGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV) { var lstRegistros = (List<ChequeTransferencia>)Grid.DataSource; if (lstRegistros.Count >= 0) { ChequeTransferencia registro = new ChequeTransferencia(); registro.Identificador = string.Empty; registro.Cliente = string.Empty; registro.Banco = string.Empty; registro.Importe = 0; lstRegistros.Add(registro); Grid.DataSource = lstRegistros; GV.RefreshData(); GV.BestFitColumns(); } }
private void RemoverRenglonDelGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV) { var lstRegistros = (List<ChequeTransferencia>)(Grid.DataSource); if (lstRegistros.Count > 0) { int i = GV.GetSelectedRows()[0]; ChequeTransferencia registro = (ChequeTransferencia)GV.GetRow(i); lstRegistros.Remove(registro); Grid.DataSource = lstRegistros; GV.RefreshData(); } }