repositoryItemGridLookUpEdit编辑绑定

   /// 
    /// 初始化其他原因下拉菜单
    /// 
    private void InitRepositoryItemQtyy()
    {
        DataTable dt = WebServiceHelp.Instance.selectDict("{\"TABLE_NO\":\"266\"}");
        if (dt != null && dt.Rows.Count > 0)
        {
            DataRow dr = dt.NewRow();
            dr["fieldText"] = "";
            dr["fieldValue"] = "";
            dt.Rows.InsertAt(dr, 0);
            repositoryItemGridLookUpEdit2.DataSource = dt;
            repositoryItemGridLookUpEdit2View.OptionsBehavior.AutoPopulateColumns = false;
            repositoryItemGridLookUpEdit2View.Columns.Clear();
            var column1 = repositoryItemGridLookUpEdit2View.Columns.Add();
            column1.Caption = "其他原因";
            column1.FieldName = "fieldText";
            column1.Visible = true;
            var column2 = repositoryItemGridLookUpEdit2View.Columns.Add();
            column2.Caption = "fieldValue";
            column2.FieldName = "fieldValue";
            column2.Visible = false;

        }
    }

添加绑定信息,显示多列,控制显示列数

你可能感兴趣的:(gridcontrol,dev)