hi everybody , my Question is , how i can get the last row in my datagridview

thanx in advance :)

Using the rowindex. or get the number of rows in grid and select the last row

ty , other question please after i get the last row in my dgv how i can make my cursor wait in cell i this row

U need to set the activecell proerty or active row property to set the cursor

as Pgmer said you can use the rowindex to get your last row here is code to get the last index .

dim lastIndex as integer
lastIndex=datagridview.rows.count -1 ' this code will give you the last index of row. 


dim last as integer

getting last row and for focus there
when adding new row or directly focus there


like this article