Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Trouble with Web Grid InitializeDataSource Function
posted

I have a web Grid and I'm using the InitializeDataSource Function but when I try to use this function I get the following error:

 Handles clause requires a WithEvents variable defined in the containing type or one of its base types

Anyone have any information on whats missing?

  • 28464
    posted

    There are several ways to proceed (some of them mayb apply in certain scenarios, #3 will work in all cases)

    1. Delcare the grid instance as "WithEvents" in the declaration

    Public WithEvents grid as UltraWebGrid
    2. Use AddHandler if the situation requires it - please, see the following thread for details:
    http://forums.infragistics.com/forums/p/1128/11280.aspx#11280
    3. Use declarative syntax for setting the events, for example
    <igtbl:UltraWebGrid ID="Uwg1" runat="server" OnInitializeDataSource="InitDataSource" ... />