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

Handler doesnot have the same signature

Hi,

I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event 'SelectedIndexChanged'
because they do not have the same signature.

I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed a
DataGrid and filled it with data from SQL2000. Now, when a user selets a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this error.

Any help is appreciated,

regards, Ger.


Dec 21 '07 #1
7 6304
On Dec 21, 1:09 pm, Ger <G...@discussions.microsoft.comwrote:
Hi,

I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event 'SelectedIndexChanged'
because they do not have the same signature.

I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed a
DataGrid and filled it with data from SQL2000. Now, when a user selets a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this error.

Any help is appreciated,

regards, Ger.
Signatures must be same as defined via intellisense in events.
Dec 21 '07 #2
Thanks kimi for answering, but I donot quite understand.

When I modify the e (in stead of system.eventargs I put
DataGridCommandEventArgs) the handle gives me intellisense to
SelectedIndexChange.....

So:

Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DG.SelectedIndexChanged

I stated:

Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs) Handles DG.SelectedIndexChanged

Intellisense shows up when typing 'Handles DG.' and SelectedIndexChanged can
be choosen, but when leaving the sentence with the cursor, a showtip shows
up, that the method could not handle the event cause it doesnot have the same
signature.

Can you explain further ?

regards, Ger.

"kimiraikkonen" wrote:
On Dec 21, 1:09 pm, Ger <G...@discussions.microsoft.comwrote:
Hi,

I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event 'SelectedIndexChanged'
because they do not have the same signature.

I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed a
DataGrid and filled it with data from SQL2000. Now, when a user selets a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this error.

Any help is appreciated,

regards, Ger.

Signatures must be same as defined via intellisense in events.
Dec 21 '07 #3


"Ger" wrote:
Hi,

I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event 'SelectedIndexChanged'
because they do not have the same signature.

I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed a
DataGrid and filled it with data from SQL2000. Now, when a user selets a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this error.

Any help is appreciated,

regards, Ger.

You changed the signature by changing the type of "e". Your new signature
is not compatible with the handler for the SelectedIndexChanged event.
Dec 21 '07 #4
Ger,

The most simple by events is just to create a new one and cut and paste that
from the bottom over the original one.

Saves you a lot of time.

(Just as I do it in those cases)

Cor

Dec 21 '07 #5
Humm. I don't see a SelectedIndexChanged event for the DataGridView. Are
you sure you don't confuse the DataGridView and a ComboBox ?

--
Patrice

"Ger" <Ge*@discussions.microsoft.coma écrit dans le message de news:
05**********************************@microsoft.com...
Thanks kimi for answering, but I donot quite understand.

When I modify the e (in stead of system.eventargs I put
DataGridCommandEventArgs) the handle gives me intellisense to
SelectedIndexChange.....

So:

Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DG.SelectedIndexChanged

I stated:

Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs) Handles DG.SelectedIndexChanged

Intellisense shows up when typing 'Handles DG.' and SelectedIndexChanged
can
be choosen, but when leaving the sentence with the cursor, a showtip shows
up, that the method could not handle the event cause it doesnot have the
same
signature.

Can you explain further ?

regards, Ger.

"kimiraikkonen" wrote:
>On Dec 21, 1:09 pm, Ger <G...@discussions.microsoft.comwrote:
Hi,

I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event
'SelectedIndexChanged'
because they do not have the same signature.

I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed a
DataGrid and filled it with data from SQL2000. Now, when a user selets
a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this
error.

Any help is appreciated,

regards, Ger.

Signatures must be same as defined via intellisense in events.

Dec 21 '07 #6
On Dec 21, 6:11 pm, "Patrice" <http://www.chez.com/scribe/wrote:
Humm. I don't see a SelectedIndexChanged event for the DataGridView. Are
you sure you don't confuse the DataGridView and a ComboBox ?

--
Patrice

"Ger" <G...@discussions.microsoft.coma écrit dans le message de news:
0508676E-66FE-4494-AE82-0A8912D22...@microsoft.com...
Thanks kimi for answering, but I donot quite understand.
When I modify the e (in stead of system.eventargs I put
DataGridCommandEventArgs) the handle gives me intellisense to
SelectedIndexChange.....
So:
Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DG.SelectedIndexChanged
I stated:
Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs) Handles DG.SelectedIndexChanged
Intellisense shows up when typing 'Handles DG.' and SelectedIndexChanged
can
be choosen, but when leaving the sentence with the cursor, a showtip shows
up, that the method could not handle the event cause it doesnot have the
same
signature.
Can you explain further ?
regards, Ger.
"kimiraikkonen" wrote:
On Dec 21, 1:09 pm, Ger <G...@discussions.microsoft.comwrote:
Hi,
I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event
'SelectedIndexChanged'
because they do not have the same signature.
I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I draweda
DataGrid and filled it with data from SQL2000. Now, when a user selets
a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this
error.
Any help is appreciated,
regards, Ger.
Signatures must be same as defined via intellisense in events.
Patrice,
For DataGridView "selectionChanged" is available, and
"SelectedIndexChanged" event is available for Listbox control.

Hope this helps.
Dec 21 '07 #7
I'm not the OP. Actually I noticed the OP is still using a DataGrid so what
I said about the DataGridView may not apply (my first idea was a confusion
between two controls)...

Anyway it could likely be handled by just looking at the tooltip that shows
up in case of a signature mismatch. If the OP read this I would suggest to
deouble check that what is shown in the tooltip is really the same on both
sides (though if using VS2003 I'm not sure you have this tooltip)...

--
Patrice

"kimiraikkonen" <ki*************@gmail.coma écrit dans le message de news:
d9**********************************...oglegroups.com...
On Dec 21, 6:11 pm, "Patrice" <http://www.chez.com/scribe/wrote:
Humm. I don't see a SelectedIndexChanged event for the DataGridView. Are
you sure you don't confuse the DataGridView and a ComboBox ?

--
Patrice

"Ger" <G...@discussions.microsoft.coma écrit dans le message de news:
0508676E-66FE-4494-AE82-0A8912D22...@microsoft.com...
Thanks kimi for answering, but I donot quite understand.
When I modify the e (in stead of system.eventargs I put
DataGridCommandEventArgs) the handle gives me intellisense to
SelectedIndexChange.....
So:
Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DG.SelectedIndexChanged
I stated:
Private Sub DG_SelectedIndexChanged(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs) Handles DG.SelectedIndexChanged
Intellisense shows up when typing 'Handles DG.' and SelectedIndexChanged
can
be choosen, but when leaving the sentence with the cursor, a showtip
shows
up, that the method could not handle the event cause it doesnot have the
same
signature.
Can you explain further ?
regards, Ger.
"kimiraikkonen" wrote:
On Dec 21, 1:09 pm, Ger <G...@discussions.microsoft.comwrote:
Hi,
I encountered the following error:
Method 'DG_SelectedIndexChanged' cannot handle Event
'SelectedIndexChanged'
because they do not have the same signature.
I am using SBS2003, SQL2000, ASP.net 1.1 (VB.net). On a form I drawed
a
DataGrid and filled it with data from SQL2000. Now, when a user
selets
a row
in the DataGrid I want to retrieve the data of the row via the
SelectedIndexChanged-event. In this case, I have to modify the e from
system.eventargs into DataGridCommandEventArgs, but then I got this
error.
Any help is appreciated,
regards, Ger.
Signatures must be same as defined via intellisense in events.
Patrice,
For DataGridView "selectionChanged" is available, and
"SelectedIndexChanged" event is available for Listbox control.

Hope this helps.
Dec 21 '07 #8

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

Similar topics

1
by: Cindy Liu | last post by:
Hi Everyone, I can use .Net Reflection to know there is an event defined in a class. But I don't know how to get the signature of that event handler? Any idea? Thanks in advance!!! Cindy
2
by: Bram Stolk | last post by:
Hello, I catch SIGINT signals with a handler. In the handler, I use fd's to write some data to a child process. Is this valid? Because the data never arrives, and I wonder what I'm doing...
4
by: Raj Wall | last post by:
I have an event handler inside a thread class that needs to have access to thread specific information (versus similar info in other threads). If I change the handler's method signature to "public"...
2
by: John A Grandy | last post by:
For ASP.NET UserControls , is it possible to provide multiple overrides of the intrinsic handler methods (those for which the delegate that wires the event to the handler is built-in , such as Init...
6
by: Zeba | last post by:
Hi guys, This is related to one of my previous posts, but I felt I deserved a new post. Is there any way to debug my HttpHandler class ? From what I understand, the handler class is compiled...
3
by: kevinforbes | last post by:
Hi All, I'm a little rusty on my C# so any help would be much appreciated. ..net 2.0, C#, using a COM object with events I have a COM object (built in C++) that throws various telephony...
1
by: Mike Thompson | last post by:
I have an event handler defined within a class. It has the following signature: static void XYZ_EventHandler (object sender, XYZEventArgs e) From within this event handler, I want to access...
7
by: Andrus | last post by:
I noticed that DataGridView CellValidated() and other event handler first parameter is object: Grid.CellValidated+=new DataGridViewCellEventHandler(Grid_CellValidated); .... void...
2
by: =?Utf-8?B?UlJK?= | last post by:
Hello, I would like to add the Paint handler to the form. How to do it? Thanks in advance.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.