gridview - grid scrolling by code in C# -


i want scroll gridview code in c#. when added row,then gridview show last row. used this:

datagridview1.currentcell = datagridview1.rows[datagridview1.rowcount - 1].cells[1]; 

but not work correctly.

you can try solution , works long autosizerowsmode property not set displayedcells:

datagridview1.firstdisplayedscrollingrowindex = datagridview1.rows.count-1; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -