TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
evan liewer
NA
25
35.9k
ComboBox in DataGridView Shows ValueMember and not Display Member
Sep 15 2012 11:43 AM
I have a dataGridView that one of the columns needs to be a dropdown box. I used the built in functions of VS to create the form. Everything works, when I click on the box it displays the correct text and it will update my SQL with the value member. However, when the form loads, it shows the ValueMember for every column. Only when clicking does it show the text description. here is the code VS created
//
// lmpackagingDataGridViewTextBoxColumn
//
this.lmpackagingDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.lmpackagingDataGridViewTextBoxColumn.DataPropertyName = "lm_packaging";
this.lmpackagingDataGridViewTextBoxColumn.DataSource = this.packageBindingSource;
this.lmpackagingDataGridViewTextBoxColumn.DisplayMember = "PKG_DESC";
this.lmpackagingDataGridViewTextBoxColumn.HeaderText = "Packaging";
this.lmpackagingDataGridViewTextBoxColumn.Name = "lmpackagingDataGridViewTextBoxColumn";
this.lmpackagingDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.lmpackagingDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.lmpackagingDataGridViewTextBoxColumn.ValueMember = "PKG_ID";
thank you
Reply
Answers (
0
)
display images in gridview if there is no image in database
Normalization