UltraWebGrid_InitializeDataSource(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs) Handles UltraWebGrid.InitializeDataSource
Error 1 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
More details: Using XML features, binding to a sqldatasource( procedure works fine outside of formview, so I just need to know how to set up the WithEvents stuff when UltraWebGrid is embedded within a template like FormView).
Still interested in solving this. I need help wiring up the initializedatasource event when the grid is inside a template (item, edit, insert). I will still work the problem from outside the formview control...
If you're not creating the control dynamically, you should be able to switch your aspx page into design mode and manually add a oninitializedatasource="myhandler" attribute to the <igtbl:UltraWebGrid> tag. Make sure that the method that you're using as the event handler is protected or public because otherwise the code that wires things up won't be able to access it.
If this doesn't work, you'll need to programatically add the handler in the page's Init event:
AddHandler grid.InitializeDataSource, AddressOf Grid_InitializeDataSource