This is a migrated thread and some comments may be shown as answers.

Grid not maintaining height

5 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Grant asked on 09 Sep 2016, 12:13 PM

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

Sort by
0
Accepted
Rumen
Telerik team
answered on 09 Sep 2016, 12:43 PM
Hi Grant,

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
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Grant
Top achievements
Rank 3
Iron
Iron
Iron
answered on 09 Sep 2016, 01:09 PM

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

0
Accepted
Rumen
Telerik team
answered on 13 Sep 2016, 08:23 AM
Hi 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
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Grant
Top achievements
Rank 3
Iron
Iron
Iron
answered on 13 Sep 2016, 10:13 AM

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

0
Rumen
Telerik team
answered on 13 Sep 2016, 03:35 PM
Thanks for the nice words, Grant!

It's all about the animation and nothing else.

Regards,
Rumen
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
General Discussions
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Rumen
Telerik team
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or