2

実行時に DevExpress GridView の列に TextEdit を追加しようとしています。

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

私は何を逃したのですか?(機能しないので、「コメント」はまだ通常の列です)

4

1 に答える 1

1

以下のコードを使用して、TextEdit 列をテキスト フィールドに追加できました。RepositoryItems.Add 関数を使用する必要はありませんでした。

        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;
于 2009-04-30T16:34:17.983 に答える