How do i set focus to a single cell that i determine

G

Guest

I have a form with a datagrid. The datagrid contains 5 columns and 5 rows.

the cell of the last column and the last row in the datagrid is set to
editable. When the form loads, I want the current focus to be set to this
particular editable field in the datagrid. The focus should highlight
whatever data is in the datagrid field at that time.

How do I do this? Thank you
 
K

Ken Tucker [MVP]

Hi,

Dim dgc As New DataGridCell(3, 2)

DataGrid1.CurrentCell = dgc



Ken

---------------------------------

I have a form with a datagrid. The datagrid contains 5 columns and 5 rows.

the cell of the last column and the last row in the datagrid is set to
editable. When the form loads, I want the current focus to be set to this
particular editable field in the datagrid. The focus should highlight
whatever data is in the datagrid field at that time.

How do I do this? Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top