Solved

What has the signature as DataGridItemEventArgs?

Posted on 2007-12-03
4
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 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