Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ItemDataBound event is not firing

Posted on 2004-10-13
2
Medium Priority
?
581 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
[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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

704 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