Solved

ItemDataBound event is not firing

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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