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

How to disable scrolling when creating the window client-side

2 Answers 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Maluck
Top achievements
Rank 2
Michael Maluck asked on 18 Mar 2011, 12:02 PM
Hello,

when creating the window by using @Html.Telerik().Window() ... one can use the Scrollable(false) method. This suppresses the scroll bars of the window. You want to do this when using the window together with an iframe to suppress an unneeded scroll bar.

Unfortunately I do not see a property when creating the window client-side by using $.telerik.window.create

What is the right way to suppress scroll bars when creating the window client-side. Will you add a scrollable parameter?

Regards,
Michael

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 18 Mar 2011, 06:03 PM
Hi Michael,

We have added a scrollable option in the Window's create client method. Changes will take effect in the next internal build.

In the meantime, you can disable scrolling by applying an overflow:hidden CSS style with jQuery:

$("#WindowName").find(".t-window-content").css("overflow", "hidden");

You can use the above Javascript code in the OnOpen client event handler.

http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-window-client-api-and-events.html#OnOpen

In the unlikely scenario that you would prefer all Windows in your application to have no scrollbars, you can enforce this with a CSS rule:

.t-window  div.t-window-content
{
       overflow: hidden;
}


Best wishes,
Dimo
the Telerik team
0
Michael Maluck
Top achievements
Rank 2
answered on 18 Mar 2011, 08:08 PM
Hi Dimo,

thanks for adding the scrollable option for future builds.

Now I use the general css rule as proposed by you and it works perfectly.

Thanks,
Michael
Tags
Window
Asked by
Michael Maluck
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Michael Maluck
Top achievements
Rank 2
Share this question
or