Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ItemDataBound event is not firing

Posted on 2004-10-13
2
Medium Priority
?
586 Views
Last Modified: 2012-06-22
I'm rebuilding a project semi-manaully from a version where my datagrid was executing some column formatting perfectly. (long story shortened...semi-manually means moving to a different project/directory and having to deal with the change in object names and some pasting of old code to new files).

Everything is working execpt the call to the grid's ItemDataBound event.

The datagrid is instantiated with:
    Protected WithEvents dgScores As System.Web.UI.WebControls.DataGrid

I'm filling the datagrid with:
        SqlDataAdapter1.Fill(DsMyScores1)

       dgScores.DataSource = DsMyScores1
       dgScores.DataBind()

The ItemDataBound is defined as:
   Private Sub dgScores_ItemDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
.
.
.
  End Sub
 
I put a breakpoint on the above function call but it's never reached.

In the course of rebuilding this stuff the definition of the dataset itself is using slightly different names/ids but the data _is_ making it into the grid....it's only the formatting that's not executing.

0
Comment
Question by:juststeve
2 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 1400 total points
ID: 12297107
Hi juststeve,

add this to your <asp:datagrid> tag
OnItemDataBound="dgScores_ItemDataBound"
and make the declaration of Sub dgScores_ItemDataBound( to be public


Regards!
B..M
0
 

Author Comment

by:juststeve
ID: 12297152
Thankx!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

927 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