private void grvroottct_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { GridView view = sender as GridView; TheoChungTu_PNH_DTO cat = view.GetRow(e.RowHandle) as TheoChungTu_PNH_DTO; if (cat != null) { e.ChildList = lst_pnhct.Where(x => x.MaPhieuNhapHang == cat.ChungTu).ToList(); } }
private void grvroottct_MasterRowEmpty(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowEmptyEventArgs e) { GridView view = sender as GridView; TheoChungTu_PNH_DTO cat = view.GetRow(e.RowHandle) as TheoChungTu_PNH_DTO; if (cat != null) { e.IsEmpty = !lst_pnhct.Any(x => x.MaPhieuNhapHang == cat.ChungTu); } }