Hi,
I wasnt sure what category this question belongs as I dont know if the issue is Grid or DataSource related. So here it is.
I've created a kendoWindow that contains a KendoGrid with a height of 350px. The problem Im having is that the Grid is not maintaining the height (and impl scroll overflow) when the window is opened multiple times.
Here is the code, (apologies for its length, Im this one bug away from it being complete) http://dojo.telerik.com/uCayI
The problem persists regardless of is the dataSource is static or remote.
You can see the bug if you run the code then open either of the windows mulitple times, you'll see the lower buttons vanish.
Please ask if anything is unclear.
Regards,
Grant
5 Answers, 1 is accepted
The reported behavior is due to that JavaScript size calculations don't work for hidden elements. The issue is explained in the following help article: Hidden Containers along with guidance how to solve it.
Best regards,
Rumen
Telerik by Progress
Hi Rumen,
This was perfect, thank you!
So I've moved the initialization of the grid from window.open to window.activate, this way the window template will have loaded and the Grid's DIV will be visible (if still empty).
My other issue is that since Im appending the generated DIV to the <body /> its placed at the bottom of the page. This normally isnt an issue as I simple call window.centre() and all is well, however the body is about screen height now so when I call window.center(), the window is horizontally centered but not vertically. I've updated the example to demo this, http://dojo.telerik.com/uCayI/4.
I'd appreciate any advise you can provide.
Thanks,
Grant
Actually, there's no need to center() the Window in the Grid's dataBound event. This can be done immediately before opening, if the Grid height style is applied to the Grid as shown at:
http://dojo.telerik.com/uCayI/5
From better UX, it is recommended to destroy a Window in its deactivate event, and not immediately after closing it, so that the closing animation is complete.
Best regards,
Rumen
Telerik by Progress
Thanks Rumen,
You've been a big help with this widget. I just have one last question about your reply;
[quote]
From better UX, it is recommended to destroy a Window in its deactivate event, and not immediately after closing it, so that the closing animation is complete.
[/quote]
How is the UX improved by destroying the window during deactivate instead of close? Is it simply that the kendoWindow runs smoother or is it something more significant?
Thanks again,
Grant
It's all about the animation and nothing else.
Regards,
Rumen
Telerik by Progress