473,404 Members | 2,187 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,404 software developers and data experts.

VS 2005 C# DataGridView.UserAddedRow Event

When I try to add this event handler, I get an error:
this.dgScheduleCamera.UserAddedRow += new
System.Windows.Forms.DataGridViewRowEventHandler(t his.dgScheduleCamera_UserAddedRow);

Error:
No overload for 'dgSchedule_UserAddRow' matches delegate
'System.Windows.Forms.DataGridViewRowEventHandler'

What I am try to do is set up a parent child multi-grid form where I need to
add the parent key info in the child grid when a new row is added.

Please advise if I am doing this wrong.

Thanks Mike
Nov 17 '05 #1
2 5211
The exception thrown, indicates that you don't have a valid definition for
the event handler

you should also have a method ...

[modifier] void dgSchedule_UserAddRow(object sender, EventArgs e) { }

now, I'm not supposing for a moment that the above signature is correct
(I've not looked at C# 2005, so I don't actually know the DataGridView
object), but it will be along those lines.
--
--

Of all words of tongue and pen, the saddest are: "It might have been"
"msmith" wrote:
When I try to add this event handler, I get an error:
this.dgScheduleCamera.UserAddedRow += new
System.Windows.Forms.DataGridViewRowEventHandler(t his.dgScheduleCamera_UserAddedRow);

Error:
No overload for 'dgSchedule_UserAddRow' matches delegate
'System.Windows.Forms.DataGridViewRowEventHandler'

What I am try to do is set up a parent child multi-grid form where I need to
add the parent key info in the child grid when a new row is added.

Please advise if I am doing this wrong.

Thanks Mike

Nov 17 '05 #2
I was using DataGridViewCellEventArgs in the definition instead of
DataGridViewRowEventArgs.
"billr" wrote:
The exception thrown, indicates that you don't have a valid definition for
the event handler

you should also have a method ...

[modifier] void dgSchedule_UserAddRow(object sender, EventArgs e) { }

now, I'm not supposing for a moment that the above signature is correct
(I've not looked at C# 2005, so I don't actually know the DataGridView
object), but it will be along those lines.
--
--

Of all words of tongue and pen, the saddest are: "It might have been"
"msmith" wrote:
When I try to add this event handler, I get an error:
this.dgScheduleCamera.UserAddedRow += new
System.Windows.Forms.DataGridViewRowEventHandler(t his.dgScheduleCamera_UserAddedRow);

Error:
No overload for 'dgSchedule_UserAddRow' matches delegate
'System.Windows.Forms.DataGridViewRowEventHandler'

What I am try to do is set up a parent child multi-grid form where I need to
add the parent key info in the child grid when a new row is added.

Please advise if I am doing this wrong.

Thanks Mike

Nov 17 '05 #3

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

Similar topics

1
by: Arvind | last post by:
Hi I edit a cell in a DataGridView, and then would move to another cell in the DataGridView using mouse. Then the DataGridView as of now does scroll down to the last visited cell. But when I try...
1
by: msmith | last post by:
When I try to add this event handler, I get an error: this.dgScheduleCamera.UserAddedRow += new System.Windows.Forms.DataGridViewRowEventHandler(this.dgScheduleCamera_UserAddedRow); Error: No...
0
by: David Veeneman | last post by:
I've come across an odd bit of behavior on the VS 2005 TabControl, and I'm wondering if its a bug, or if I'm missing something. I have a TabControl with five tab pages. Each page has a...
1
by: Joaquin | last post by:
OK, I hate myself for asking this, it's the worst question I have ever asked but it's worse not to ask: ¿How do I update a datatable in vs 2005? I mean, I am using a typed dataset, a...
1
by: Dave | last post by:
I have a table with 3 fields of which the primary key is a autonumber. I have created my dataadapter, dataset and datagridview using a wizard. However, in the datagrid, the update and delete...
1
by: David | last post by:
I have a realtime stock quote system developed where I am updating a typed dataset with realtime quotes. I want my DataGridView control to show green forecolor when a price moves up and red...
2
by: bob | last post by:
Can anyone tell me the best way to update a dataset while it is being edited/viewed in the DataGridView control? Is this something that should be inserted into one of the grid's events? or should...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
1
by: QuickBooksDev | last post by:
VB.NET 2005 DataGridView Checkbox - Check Event need to know check status I would like to use the DataGridView Checkbox like a normal checkbox. When someone clicks on it I would expect that I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.