How do I know when grid is fully loaded and displayed?

6 posts, 0 answers
  1. Igor
    Igor avatar
    3 posts
    Member since:
    Jun 2013

    Posted 11 Sep 2013 Link to this post

    i'm using 
    grid.dataSource.transport.options.read.url = "addr here";
    grid.dataSource.read();
    to reload the grid and was wondering how do i know when it's done reloading and is fully displayed?
    There does not seem to be an event for it ?
    Is there a work around?

    Thanks in advance!
  2. Dimo
    Admin
    Dimo avatar
    8483 posts

    Posted 12 Sep 2013 Link to this post

    Hi Igor,

    It seems you have overlooked the dataBound event.

    http://docs.kendoui.com/api/web/grid#events-dataBound

    http://demos.kendoui.com/web/grid/events.html

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Igor
    Igor avatar
    3 posts
    Member since:
    Jun 2013

    Posted 12 Sep 2013 Link to this post

    dataBound event is what i originally tried, but in some testing it appeared that it was fired before the grid was fully displayed...
    is that possible or was that a glitch of some kind ?
  4. Dimo
    Admin
    Dimo avatar
    8483 posts

    Posted 13 Sep 2013 Link to this post

    Hi Igor,

    We are not aware of such scenario. If you manage to recreate it, you can send it for further testing.

    If you are using some templates with nested widgets, they may not be fully ready in dataBound. In this case you can still use dataBound, but with setTimeout, as there is no later and more suitable event (from Grid's point of view).

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Chris
    Chris avatar
    1 posts
    Member since:
    Jun 2015

    Posted 16 Nov 2016 in reply to Dimo Link to this post

    I think it's unfortunate that we can only use dataBound to detect a grid being loaded. This only >implies< the grid is loaded, and fails to be useful in cases where, for example, we want the grid to load but not display data until a filter is applied.

    Obviously, your suggestion works in most cases, but it's not the same as having a proper event for this.

  6. Dimo
    Admin
    Dimo avatar
    8483 posts

    Posted 16 Nov 2016 Link to this post

    Hello Chris,

    >> "we want the grid to load but not display data until a filter is applied"

    This behavior can be achieved if you set autoBind to false.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-autoBind

    Regards,
    Dimo
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top