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
ghasem deh
NA
258
40.2k
how do excel find in datagridview !?
May 6 2015 8:44 AM
hi
i used this code to search in datagridview to find and select row ! (no filter)
butt, when datagrid have Repetitive value in row's ---> dont get next row !
How do I put a button to the next row with every click to Btn_find ?
(Find similar Excel)
private void button1_Click(object sender, EventArgs e)
{
button1.Text = "Find Next";
{
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (row.Cells["ProductId"].Value == null)
{
continue;
}
if (row.Cells["ProductId"].Value.ToString().Trim() == textBox1.Text)
{
dataGridView1.CurrentCell = row.Cells["ProductId"];
dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.Rows[row.Index].Index;
return;
}
}
}
}
Reply
Answers (
5
)
Load Image from handler using JQuery
how can display data in grid-view or listview from multi XML