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
Bineesh Viswanath
NA
1k
780.2k
Add new Row into comboBox in Windows Form
Oct 5 2013 6:54 AM
Sir, I need your help in solving a doubt in Windows Form Application.
Please go through the code below. Data is being rendering from database.
I want to insert "-Select-" to the Zero index of the comboBox.
How can it possible?
try
{
if(sqlCon.State==ConnectionState.Closed)
{
sqlCon.Open()
}
DataTable dtbl=new DataTable();
SqlDataAdapter Sqlda=new SqlDataAdapter("StudentViewAll", sqlCon);
da.Fill(d);
combBox1.DataSource = dtbl;
comboBox1.DisplayMember="Name";
comboBox1.ValueMember="id;
}
catch(Exception)
{
throw;
}
Reply
Answers (
1
)
Tips for Making C# coding Faster and Standard
Component Use. . ?