5
Contributors
7
Replies
28
Views
5 Years
Discussion Span
Last Post by AmrGhanemAboSkander
0

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

0

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. 

Regards

0

dim last as integer
last=datagridview1.rows.count-1

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

datagridview1.currentcell=datagridview1(0,datagridview1.rowindex)

like this article

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.