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
abid zaid
NA
11
0
datagridviewcomboboxcolumn select the first item
Jan 8 2008 1:52 PM
Hi all,
I'm using a Datagridviewcomboboxcolumn in to dsiplay some data in my datagridview. After binding the data to the datagridviewcombobox how can i make it display the first item in the box by default?
My code is as follow
DataGridViewComboBoxColumn col = new DataGridViewComboBoxColumn();
DataTable dt = getData();//get data from database
col.DataSource = dt;
col.DisplayMember = "LastName";
if (col.Items.Count > 0)//There is at least one item in the Combobox
{
//Select the first item
}
dataGridView1.Columns.Add(col);
Reply
Answers (
10
)
Dynamically Loading Forms
Making Flow Layout Panel Flow From Bottom Left to Bottom Right