Solved

What has the signature as DataGridItemEventArgs?

Posted on 2007-12-03
4
250 Views
Last Modified: 2007-12-05
I'm attempting to have a dataview call a DataGridItemEventArgs command. I used

OnDataBound="grdPromoDetail_ItemDataBound" in the html, but I'm receiving the complaint:

Method 'Protected Sub grdPromoDetail_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.DataGridItemEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)

What does, then?
0
Comment
Question by:barnesco
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:digitalZo
ID: 20401107
It missing the handler:
  Private Sub grdPromoDetail_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdPromoDetail.ItemDataBound
 
    End Sub

Open in new window

0
 

Author Comment

by:barnesco
ID: 20407962
I'm receiving an error message "'ItemDataBound' cannot be found" on the Handles grdPromoDetail.ItemDataBound
0
 
LVL 10

Accepted Solution

by:
digitalZo earned 500 total points
ID: 20409008
Are you using a GridView? Because ItemDataBound is used for DataGrid and not GridView. For GridView, it is RowDataBound. So your code should be [that is, if you're using GridView and not DataGrid]:


Protected Sub grdPromoDetail_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdPromoDetail.RowDataBound
 
End Sub

Open in new window

0
 

Author Comment

by:barnesco
ID: 20411660
It is a gridview, and your last post fixed the problem. I thought it might have been the RowDataBound, but I couldn't get the signature to match--I had the incorrect "e As System.Web.UI.WebControls.GridViewRowEventArgs" part--kept thinking it was suppose to be DataGridItemEventArgs.

Thank you for your persistence and patience.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question