private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { DataTable clone = customers.Clone(); DataRow row = gridView1.GetDataRow(e.RowHandle); clone.Rows.Add(row.ItemArray); e.ChildList = clone.DefaultView; }
private void grvMain_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { DataTable dt2 = chungTu.ChiTietPhieuTheoChungTu(); grvDetail.GridControl.DataSource = dt2; //e.ChildList =grvDetail. }
private void bandedGridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { BandedGridView bandgv = sender as BandedGridView; CHITIETPHIEUTRADTO ct = bandgv.GetRow(e.RowHandle) as CHITIETPHIEUTRADTO; if (ct != null) { e.ChildList = listpt.Where(p => p.NgayTra == ct.NgayTra && p.MaDocGia == ct.MaDocGia).Select(p => p).ToList(); } }
private void gvConnections_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { if (e.RowHandle < 0) { return; } SocketConnectionInfo info = (SocketConnectionInfo)this.gvConnections.GetRow(e.RowHandle); e.ChildList = info.Subscribtions; }
private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { //NotaFiscalCapa c = (NotaFiscalCapa)gridViewEntradas.GetRow(e.RowHandle); //var bs = new BindingSource(c, "NotaFiscalItems"); //var ds = bs.DataSource as NotaFiscalCapa; //List<NotaFiscalItem> items = ds.NotaFiscalItems.ToList(); //var query = from p in items // select new { p.SequencialItem, p.Produto.DescricaoProduto, p.Quantidade, p.ValorUnitario, p.TotalItem, p.Cfop.CodigoCfop, p.RegraFiscal }; //bs.DataSource = query.ToList(); //e.ChildList = bs; }
void GridView_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { var reader = GetRow(e.RowHandle); if (reader != null) { e.ChildList = new List <Card>() { reader.Card }; } }
private void gridView_fac_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { try { fa_factura_Info row = (fa_factura_Info)gridView_fac.GetRow(e.RowHandle); if (row != null) { e.ChildList = lst_factura.FirstOrDefault(q => q.IdEmpresa == row.IdEmpresa && q.IdSucursal == row.IdSucursal && q.IdBodega == row.IdBodega && q.IdCbteVta == row.IdCbteVta).DetFactura_List; } } catch (Exception) { throw; } }
async void GridView_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { var book = GetRow(e.RowHandle); if (book != null) { try { var readers = new List <Reader>(); e.ChildList = readers; readers.AddRange(IncludeObligators ? await GetBookObligators(book) : await GetBookHolders(book)); var view = GridControl.GridView.GetDetailView(e.RowHandle, 0); view.BeginDataUpdate(); view.EndDataUpdate(); } catch (Exception exc) { DialogMessages.Error(exc.Message); } } }
async void gvBooks_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { var book = GetBook(e.RowHandle); if (book != null) { try { var authors = new List <Author>(); e.ChildList = authors; authors.AddRange(await GetBookAuthors(book)); var view = gvBooks.GetDetailView(e.RowHandle, 0); view.BeginDataUpdate(); view.EndDataUpdate(); } catch (Exception exc) { DialogMessages.Error(exc.Message); } } }
private void gridViewDoki_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { try { var view = sender as DevExpress.XtraGrid.Views.Grid.GridView; var dok = view.GetRow(e.RowHandle) as p_int_dokument_pobierz; if (dok != null) { e.ChildList = DAO.p_int_artykul_pobierz(dok.do_id); } } catch (Exception ex) { log.Error(ex.Message); log.Error(ex.InnerException.Message); } }
private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { // string orderid= gridView1.GetRowCellValue(e.RowHandle, gridView1.Columns["订单号"]).ToString(); // e.ChildList = new List<Object> { new { ISBN = "123", SM = "312" } }; //e.ChildList = new DataTable().AsDataView(); DataTable dt = service.ExecuteReturnTb(this.GetType().ToString(), "GetOrderDetail", null, out selectSql, out errMsg); if (!string.IsNullOrEmpty(errMsg)) { MessageBox.Show(errMsg); return; } e.ChildList = dt.AsDataView(); }
private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { Venda v = gridViewReceber.GetRow(e.RowHandle) as Venda; var bs = new BindingSource(v, "Parcelas"); var ds = bs.DataSource as Venda; List <LancamentoFinanceiro> items = ds.Parcelas.ToList(); var query = from p in items select new { p.SequencialParcela, p.Venda.NumeroParcelas, p.DiasPrazo, p.DataVencimento, p.DataPagamento, p.ValorLancamento, }; bs.DataSource = query.ToList(); e.ChildList = bs; }
private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { var o = gridView1.GetRow(e.RowHandle) as Manutencao; var bs = new BindingSource(o, "ItensManutencao"); var ds = bs.DataSource as Manutencao; List <ItemManutencao> items = ds.ItensManutencao.ToList(); var query = from i in items select new { i.Produto.DescricaoProduto, i.Produto.UnidadeMedida.NomeUnidadeMedida, i.Produto.CategoriaProduto.NomeCategoriaProduto, i.Quantidade, i.ValorUnitario, i.Desconto, i.TotalItem, }; bs.DataSource = query.ToList(); e.ChildList = bs; }
async void GridView_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { var creator = GetRow(e.RowHandle); if (creator != null) { var view = (LibraryGridView)null; try { switch (GetRelationName(creator, e.RelationIndex)) { case "RequestApproved": var approved = new List <RequestApprovedWrap>(); e.ChildList = approved; approved.AddRange((await GetApprovedRequests(creator.Card)).Select(r => new RequestApprovedWrap(r))); view = GetChildView(e.RowHandle, e.RelationIndex); view.Do(v => v.BeginDataUpdate()); break; case "RequestRejected": var rejected = new List <RequestRejectedWrap>(); e.ChildList = rejected; rejected.AddRange((await GetRejectedRequests(creator.Card)).Select(r => new RequestRejectedWrap(r))); view = GetChildView(e.RowHandle, e.RelationIndex); view.Do(v => v.BeginDataUpdate()); break; default: break; } } catch (Exception exc) { DialogMessages.Error(exc.Message); } finally { if (view != null) { view.EndDataUpdate(); } } } }
private void gvList_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { DataRow dr = this.gvList.GetDataRow(e.RowHandle); string Key = Convert.ToString(dr["ZMBLNR"]); GroupArkEntity queryEntity = new GroupArkEntity(); DataSet dsReturn = queryEntity.QueryInfHaveArked(Key, _lciStatus); DataTable dt = new DataTable(); dt = dsReturn.Tables["ARK_PALLET"]; if (dt.Rows.Count > 0) { //if (!dt.Columns.Contains("ROWNUMBER")) // dt.Columns.Add("ROWNUMBER"); //for (int i = 0; i < dt.Rows.Count; i++) //{ // dt.Rows[i]["ROWNUMBER"] = i + 1; //} e.ChildList = dt.DefaultView; } }
private void gridViewPre_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { }
private void OnMasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { Product p = (Product)gridView1.GetRow(e.RowHandle); e.ChildList = p.Order_Details.Select(od => od.Order).Distinct().ToList();; }
private void gridViewSuCo_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { SuCoPhong c = (SuCoPhong)gridViewSuCo.GetRow(e.RowHandle); e.ChildList = c.logsucophongs.OrderByDescending(p => p.date_create).ToList(); }