Focus CellEnter Event, DataGridView



Hi all,

I have three datagridviews filled by Datasets from a Database. I want
to give the user the ability to enter contacts to persons which work
in a company.

The first datagridview is the Company, then person and then contact
(like email etc)

If the user clicks into company datagridview he can see all the
persons which works in that company. If he clicks at a Person he can
see all the Contact addresses. All that should work with the
FocusCellEnter Event.

My problem:

Int32 PersonId =

Column named PERSONID cannot be found.
Parameter name: columnName

All that works with CellContentClick event, but sometimes the
CellcontentClickevent works not well and I want to try the
FocusCellEnter event.

This error occours straight after I started the Programm, so it looks
like the Event Occours but the datagridview is not intialized at this
time.... or something like that. (I have no chance to give the Focus)

Thanks in advance

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