I use this to look for values in my DataGridView:
private void fndBtn_Click(object sender, EventArgs e)
{
BindingSource src = new BindingSource();
src.DataSource = dataGridView1.DataSource;
src.Position = src.Find("p_Name", textBox1.Text);
}
But I've two issues. First when I look for item that doesn't exist in my dgv, position returns 0 which is by default the first row. I don't want that, and if I verified using If statement I'll lose position 0, thus losing the first row.
Second is I want the row header be focused on and item found be highlighted. How is that possible?.