Solved

What has the signature as DataGridItemEventArgs?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

15 Experts available now in Live!

Get 1:1 Help Now