2
Answers

Insert Focus on New Inserted Record inC#

MaxPayne

MaxPayne

12y
960
1
how to Insert Focus on New Inserted Record on grid
Answers (2)
0
Akkiraju Ivaturi

Akkiraju Ivaturi

NA 9.5k 2.5m 12y
dataGridView1.Rows[dataGridView1.Rows.Count - 1].Selected = true;

or

dataGridView1.Rows[Rowindex].Selected = true;
0
Sukesh Marla

Sukesh Marla

NA 11.8k 1.2m 12y
Consider IntIndex is the Index of newle inserted row in the GridView

TextBox m=MyGridView.Rows[IntIndex].FindControl("MyTextbox") as TextBox;
if(m!=null)
{
        m.Focus();
}

Hope it helped.
Check answer as correct if it helped