473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 =
Convert.ToInt32(dataGridView_person.Rows[dataGridView_person.CurrentCell.RowIndex].Cells["PERSONID"].Value);

Error:
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
SePp

Jan 22 '08 #1
0 2611

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DBC User | last post by:
I would like to know how to set a focus to a datarow? (using datarow.selected=true, select the row but does not show the row on the screen visible if it is below/above the grid display area).
2
by: Paul Remblance | last post by:
I am trying to use the bindingnavigator addnewitem button to place the focus on the first cell in the newrow row. I have disabled the default action and I am using the bindingnavigatoraddnewitem...
5
by: svaradan | last post by:
Hi I have an issue wherein when the RowLeave event is trigerred ina datagridview, I want to set the focus back to the row where the validation failed. But the cell focus goes to the cell i...
1
mafaisal
by: mafaisal | last post by:
How to Focus Particular Cells of Datagridview in vb.net ie, in FlexGrid We got focus by With flexgrid1 .Row=0 .col=1 .focus end with then we get focus on col1 in Datagridview how get it..?
0
by: rk4088 | last post by:
Hi all, I'm a new to vb.net. I'm having datagridview in my windows form. I've to make a focus in the fourth column of the datagridview.. I need coding for this.. Pls help.
9
by: Miro | last post by:
My current headache is proper is with the datagridview I am starting to realize that a DataGridView within vs2008 is not as 'robust' as a 'textboxfield' by default for example. Example: A...
5
by: Andrus | last post by:
Steps to reproduce issue: 1. Run code. 2. Enter some data to grid 3. Click other form caption 4. Click original form caption 5. Enter some characters Observed: entered characters are ignored
1
by: stumorgan | last post by:
I have a couple questions regarding the DataGridView object... 1) What is the underlying data type that the DataGridView uses if you are using it unbound and do for instance dgv.Columns.Add(). ...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.