1. 程式人生 > >DevExpress GridControl繫結資料

DevExpress GridControl繫結資料

  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