欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

DevExpress GridControl绑定数据

程序员文章站 2022-06-08 17:18:11
...
  private bool BindGV()
        {
            //IFCF.InitListView(lstUser);
            string sDel = this.btnShowFinished.Checked ? "Y" : "N";
            string sFinish = this.btnShowFinished.Checked ? "All" : "";
            DataTable dt = QCMLIST.ViewInspectionBatchListWithIcon(cBatchDelFlag: sDel, sBatchStatus: sFinish);
            //DataTable dt = QCMLIST.ViewInspectionBatchList(cBatchDelFlag: sDel, sBatchStatus: sFinish);
            if (dt != null)
            {
                DevGridControlHelper.BindData(gdcDetail, dt, new int[] { 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1 });
                gdvDetail.Columns[0].Width = 20;
                return true;
            }
            else
            {
                return false;
            }
        }

参数数组的作用于列表字段是否显示,1则显示,-1不显示

转载于:https://my.oschina.net/8824/blog/3075751