示例#1
0
        private void gridViewModel_MasterRowExpanding(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowCanExpandEventArgs e)
        {
            List <JC_LargedataAnalysisConfigInfo> dataList = gridControlModel.DataSource as List <JC_LargedataAnalysisConfigInfo>;

            if (dataList == null || dataList.Count == 0)
            {
                return;
            }

            int    rowHandle = gridViewModel.FocusedRowHandle;
            string daID      = gridViewModel.GetRowCellValue(rowHandle, "Id").ToString();  //是ookUpEdit.Properties.ValueMember的值

            //1.根据模型ID查询模型区域断电配置信息
            List <JC_RegionOutageConfigInfo> regionOutageConfigInfoList = regionOutageBusiness.GetRegionOutage(daID);

            List <Jc_DefInfo> LevelTrueDescription  = new List <Jc_DefInfo>();
            List <Jc_DefInfo> LevelFalseDescription = new List <Jc_DefInfo>();

            if (regionOutageConfigInfoList != null && regionOutageConfigInfoList.Count > 0)
            {
                foreach (var item in regionOutageConfigInfoList)
                {
                    //2.根据测点ID查询测点信息
                    Jc_DefInfo jc_DefInfo = new Jc_DefInfo();
                    jc_DefInfo = PointDefineBusiness.QueryPointByPointID(item.PointId);
                    if (item.ControlStatus == 1)
                    {
                        LevelTrueDescription.Add(jc_DefInfo);
                    }
                    else
                    {
                        LevelFalseDescription.Add(jc_DefInfo);
                    }
                }
            }

            //3.初始化测点数据
            foreach (var item in dataList)
            {
                if (item.Id == daID)
                {
                    item.LevelTrueDescription  = LevelTrueDescription;
                    item.LevelFalseDescription = LevelFalseDescription;
                }
            }

            gridControlModel.DataSource = dataList;
        }
示例#2
0
        void GridView_MasterRowExpanding(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowCanExpandEventArgs e)
        {
            var row = GetRow(e.RowHandle);

            if (row != null)
            {
                if (IncludeObligators)
                {
                    e.Allow = row.DelayedBookQuantity != 0;
                }
                else
                {
                    e.Allow = row.TakenBookQuantity != 0;
                }
            }
            else
            {
                e.Allow = false;
            }
        }
示例#3
0
        void gvBooks_MasterRowExpanding(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowCanExpandEventArgs e)
        {
            var row = GetBook(e.RowHandle);

            e.Allow = row != null && row.HasAuthors;
        }
示例#4
0
        void GridView_MasterRowExpanding(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowCanExpandEventArgs e)
        {
            var book = GetRow(e.RowHandle);

            e.Allow = book != null && book.HasAuthors;
        }
示例#5
0
 void gridView1_MasterRowExpanding(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowCanExpandEventArgs e)
 {
     e.Allow = true;
 }