private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e) { GridView view = sender as GridView; PhieuMuaHang Phieu = view.GetRow(e.RowHandle) as PhieuMuaHang; if (Phieu != null) { e.ChildList = CT_phieu.Where(x => x.MaMH == Phieu.MaMH).ToList(); } }
private void gridView1_MasterRowEmpty(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowEmptyEventArgs e) { GridView view = sender as GridView; PhieuMuaHang Phieu = view.GetRow(e.RowHandle) as PhieuMuaHang; if (Phieu != null) { e.IsEmpty = !CT_phieu.Any(x => x.MaMH == Phieu.MaMH); } }