代码之家  ›  专栏  ›  技术社区  ›  kpollock

在运行时将TextEdit添加到DevExpress GridView的列

  •  2
  • kpollock  · 技术社区  · 16 年前

    我正在尝试在运行时将TextEdit添加到DevExpress GridView的列中,这就是我得到的(几乎是从一些自动生成的设计器代码复制的)。

    DevExpress.XtraEditors.Repository.RepositoryItemTextEdit commentTextEdit 
          = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
    gvwEnquiryList.Columns["Comments"].ColumnEdit = commentTextEdit;
    ctlEnquiryList.RepositoryItems.Add(commentTextEdit);
    

    我错过了什么?(因为它不起作用,“评论”仍然只是一个普通的栏目)

    1 回复  |  直到 16 年前
        1
  •  1
  •   Nathan Koop    16 年前

            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit commentTextEdit = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            commentTextEdit.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
            commentTextEdit.Appearance.Options.UseBackColor = true;
            commentTextEdit.Name = "commentTextEdit";
    
            this.comments.ColumnEdit = commentTextEdit;