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

1 Answer 10114 Views
Grid
Igor
Top achievements
Rank 1
Igor asked on 11 Sep 2013, 10:43 PM
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!

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Sep 2013, 10:31 AM
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!
Igor
Top achievements
Rank 1
commented on 12 Sep 2013, 01:39 PM

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 ?
Dimo
Telerik team
commented on 13 Sep 2013, 05:34 AM

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!
Chris
Top achievements
Rank 1
commented on 16 Nov 2016, 11:45 AM

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.

Dimo
Telerik team
commented on 16 Nov 2016, 01:37 PM

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.
Tags
Grid
Asked by
Igor
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or