Solved

ItemDataBound event is not firing

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

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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