set itemdatabound event

Posted on 2005-05-08
Last Modified: 2012-06-27
sub setUp(byRef myDG as DataGrid)        
   myDG = new DataGrid()
   dim bc as BoundColumn
   myDG.AutoGenerateColumns = false
   myDG.CssClass = "dgStyle"
   myDG.ItemDataBound = writeFooter  *****

This line gives me the following error

'Public Event ItemDataBound(sender As Object, e As System.Web.UI.WebControls.DataGridItemEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

How do I create a RaiseEvent statement?
Question by:ARACK04
    1 Comment
    LVL 12

    Accepted Solution

    addhandler mydg.itemdatabound, addressof writefooter

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 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

    11 Experts available now in Live!

    Get 1:1 Help Now