Solved

What has the signature as DataGridItemEventArgs?

Posted on 2007-12-03
4
239 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dynamic menu in asp.net c# 11 57
Authentication of Web Services 3 46
ASP.net Run 3 sliders vertically as opposed to horizontally 9 18
Help with C#, MVC, razor. 6 18
AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now