forms - How to move the cursor in a DataGridView c# -


how move cursor in datagridview? no. .selected = true; puts cell in blue default! want cursor move when click on "add" button, want cursor moves last row , last column

i use :

this.dgridview.rows[nbr].cells[0].selected = true; this.dgridview.beginedit(true); 

but doesn't work

thanks

well, if mean in datagridview first row still remains being selected while don't want be, can use currentcell property:

private void form1_load(object sender, eventargs e) {//for example, in _load method   /*some code here, grid initialization*/   /*...*/   //set selectionmode property in fullrowselect, needs installed   //this approach work  datagridview1.selectionmode = datagridviewselectionmode.fullrowselect;  datagridview1.currentcell = datagridview1.rows[i].cells[i]; } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -