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
Jyoti Jodha
NA
1.7k
406.3k
How to display two different columns in one combobox c#
Sep 21 2017 7:37 AM
How to display two different columns in one combobox windows form c#
DataRow dr;
con.Open();
SqlCommand cmd = new SqlCommand("select Product_ID,Name,Bar_Code from Product", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
dr = dt.NewRow();
dr.ItemArray = new object[] { 0, "--Select Product--" };
dt.Rows.InsertAt(dr, 0);
comboBoxproduct.ValueMember = "Product_ID";
comboBoxproduct.DisplayMember = "Name" or "Bar_Code";
comboBoxproduct.DataSource = dt;
con.Close();
Reply
Answers (
10
)
Please my datagridview is blinking in c# windows form
Illegal characters in path in windows form c#