Click here to Skip to main content
15,919,749 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to Programmatically Change Current Row to last row in datagridview c#?
Posted
Updated 14-Jun-13 20:28pm
v2
Comments
Sergey Alexandrovich Kryukov 15-Jun-13 1:14am    
System.Windows.Forms? Tag it. Provide full type name is you are asking about some type.
Do one more thing: define what do you mean by "go", and then you can surely get some answer.
But I think the better advice would be: just read the MSDN help page on this type.
—SA
Please provide some code and clarify your question.
AZAD CHOUHAN 15-Jun-13 2:18am    
please provide full description what you actually want?

1 solution

C#
if (grid.Rows.Count == 0)
   return;
if (grid.CurrentCell != null)
   grid.CurrentCell = grid.Rows[grid.Rows.Count - 1].Cells[grid.CurrentCell.ColumnIndex];
else
   grid.CurrentCell = grid.Rows[grid.Rows.Count - 1].Cells[0];
 
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