Solved

ItemDataBound event is not firing

Posted on 2004-10-13
2
561 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 350 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

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

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…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

912 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

19 Experts available now in Live!

Get 1:1 Help Now