Exemplo n.º 1
0
        private void grvCabecera_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            //Carga datos al detalle
            GridView           view     = sender as GridView;
            CEExportacionSaldo cabecera = view.GetRow(e.RowHandle) as CEExportacionSaldo;

            if (cabecera != null)
            {
                e.ChildList = lstDetalleExportaciones.Where(x => x.Exportacion_Id == cabecera.Exp_Id).ToList();
            }
        }
Exemplo n.º 2
0
        private void grvCabecera_MasterRowEmpty(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowEmptyEventArgs e)
        {
            //si cabecera (Exportacion) no tiene detalle (Detalle exportacion) el signo + se habilita
            GridView           view     = sender as GridView;
            CEExportacionSaldo cabecera = view.GetRow(e.RowHandle) as CEExportacionSaldo;

            if (cabecera != null)
            {
                e.IsEmpty = !lstDetalleExportaciones.Any(x => x.Exportacion_Id == cabecera.Exp_Id);
            }
        }