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
RD Design
NA
25
26.7k
How to get complete column values from datagridview?
Feb 2 2015 3:50 AM
Hi,
I have a datagridview with 2 columns. Like below one
Heading1
Heading 2
BMW
2014
Jaguar
2005
Honda
2012
I need to get cell values (2014,2005,2012) of "Heading 2" column in to array.Have tried this way but not really success
foreach (DataGridViewRow row in dataGridView1.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
if (cell.ColumnIndex == 1)
{
MessageBox.Show(cell.Value.ToString());
Application.Exit();
}
}
}
How can I achieve this?
Thanks
Reply
Answers (
10
)
How do i trigger tab key on press enter key?
query