如何在DisplayMember
不更改的情况下在末尾添加一些文本或其他字段DataSource
this.lstSubjects.DataSource = this.subjectBindingSource;
this.lstSubjects.DisplayMember = "Caption";
this.lstSubjects.FormattingEnabled = true;
this.lstSubjects.Name = "lstSubjects";
this.lstSubjects.ValueMember = "SubjectCode";
this.lstSubjects.SelectedIndexChanged += new System.EventHandler(this.lstSubjects_SelectedIndexChanged);
例如,我想在每个列表框行中同时显示DataTable 的Caption
和SubjectCode
字段,但是每行的值将是SubjectCode
我想要这样的东西:
ListBox 的 DisplayMember = "技术 (AD)"
列表框的值 = "AD"
提前致谢,