Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello sir.

I am entering some rows to the gridview from textboxes by button click. after entering some rows, it will not display the last row on the page, still it is displaying first row. so I can't see the row entering or not.

To set the focus to last enter row. what do i do?

I am not using database. if anybody know please help me.

Thanking you.
Posted
Updated 29-Nov-10 1:42am
v2
Comments
Sunasara Imdadhusen 29-Nov-10 6:20am    
Please provide snippet of code!!

Thank you for your question. Follow the bellow code.

C#
GridView1.Rows[19].Focus(); // RowIndex here.
//For last 
GridView1.Rows.Count-1


More about ii by the link,
http://forums.asp.net/t/1024769.aspx[^]

Thanks,
Mamun
 
Share this answer
 
Try like this
C#
GridView1.Rows[GridView1.Rows.count].Cells[1].Controls[0].Focus(); 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900