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
150
Run custom javascript after webdatagrid finishes loading (afterloading event)
posted

Is there an event on the webdatagrid that we can subscribe to, that fires AFTER the grid has finished loading and rendering?

Could you provide an example of this?

BTW, checking the document.readystate = "complete" does not work as it is triggered too soon, before the grid has fully loaded.

Thanks

Parents
No Data
Reply
  • 1660
    Offline posted

    Hello Carlos,

    Have you considered using the Initialize client-side event of the grid? If you move the logic to the Initialize event of the grid, does it work there?

    Additionally, could you share what you are trying to achieve after the grid is loaded?

    The reason why I am asking is that if you are performing any operation that would require changes to any properties of the row objects, they might not have been initialized due to a performance optimization, where the row objects are only initialized when the user has hovered over the specific row or the row has been accessed through the API.

    For example, if you are using a variable to reference a row object, this row object might not be initialized and might result in a error or the row object being null, however if you store the row index you could access the row through the API, which would force its initialization:

     

    function Initialize(sender, e) {
                var grid = sender;
                var row = grid.get_rows().get_row(row_index);
                //your code
                }

    Looking forward to hearing from you.

    Regards,
    Ivan Kitanov

Children
No Data