Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want focus at second cell of first record when datagrid loads on the event form load.
I have tried this but failed:

Dim rowToSelect As DataGridViewRow = gvBlockedTreatment.Rows(0)
rowToSelect.Selected = True
rowToSelect.Cells(2).Selected = True
gvBlockedTreatment.CurrentCell = rowToSelect.Cells(2)

the code works normal in other event but not on form load.Please suggest.

Regards,
Sofia
Posted

1 solution

 
Share this answer
 
Comments
sofia3 25-Feb-12 8:17am    
I want selection on form load dear...its not working...

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