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
215
InitializeLayout not being called for 2nd WebGrid on aspx page...
posted

Hello,

I have two WebGrids, and each has a call to their own InitializeLayout event (this is server side events, not ClientSide events)

the first grid on the page is calling its InitializeLayout fine, but the 2nd grid, even though the event is wired up to it, is not having its InitilizeLayout event called...

can you not have two separate InitializeLayout events called from two separate WebGrids on the same aspx page?

Thanks

Parents
No Data
Reply
  • 1923
    posted

    You definitely can have more than 1...A number of our pages have 3 or 4 all with their events wired up.

    Double check that the 'Handles' setup for the function has the correct grid names etc. If you have renamed your grid, copied the grid or copied the function, it may now be missing...or referencing the wrong grid

    ' This is correctly consuming the event for UltraWebGrid1
    Protected Sub UltraWebGrid1_InitializeLayout(ByVal sender As Object, ByVal e As LayoutEventArgs) Handles UltraWebGrid1.InitializeLayout

    ' This was copied and no longer has the handles attribute...just to add it back in
    Protected Sub UltraWebGrid2_InitializeLayout(ByVal sender As Object, ByVal e As LayoutEventArgs)

    ' This was copied but somehow is also handling the wrong grids event...
    Protected Sub UltraWebGrid3_InitializeLayout(ByVal sender As Object, ByVal e As LayoutEventArgs) Handles UltraWebGrid1.InitializeLayout

Children
No Data