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

Hide the close icon from a Window

6 Answers 818 Views
Window
This is a migrated thread and some comments may be shown as answers.
mvbaffa
Top achievements
Rank 1
mvbaffa asked on 19 Oct 2011, 03:10 AM
Hi,

I have a Logon window so I do not want to allow my user to close my window.

How can I hide the close Icon ???

Thanks in advance

6 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 19 Oct 2011, 07:54 AM
Hi Mvbaffa,

You can do so by passing an empty object to the actions configuration option when initializing the window. See this example:

http://jsfiddle.net/underlog/Szd5Z/2/

Regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mvbaffa
Top achievements
Rank 1
answered on 19 Oct 2011, 01:18 PM
Petio,

I will try as soon as I can access my development machine. In fact I have not defined the the actions configuration so the framework used the default that is include the close button.

Just a few more questions:

  1. The window is modal what should I use to close the windows close() or destroy() ???
  2. The content of the window is filled with an ASP.NET MVC Web User Control. There are some hidden spans. If, using jQuery, I show these hidden elements will the height of the window stretch automatically ???

Thanks in advance
0
Dimo
Telerik team
answered on 19 Oct 2011, 03:07 PM
Hi Marcus,

1. It depends on what you want to do. Close() hides the Window, but does not remove it from the DOM, so it can be shown again easily. Destroy() removes the Window from the DOM, and the assumption is that you don't need the Window object anymore.

2. The Window will stretch automatically if scrolling is disabled and there is no explicit height set.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mvbaffa
Top achievements
Rank 1
answered on 19 Oct 2011, 05:55 PM
Dimo,

Excuse me but I could not find a method or configuration to disable scrolling.

Thanks
0
Accepted
Dimo
Telerik team
answered on 19 Oct 2011, 06:15 PM
Hi Marcus,

The Window widget has a scrollable option that can be set during initialization (it accepts a bool value). However, my previous reply was a little misleading. Omitting the height is actually more important. Setting scrollable will have impact only on content that might overflow horizontally (if you have set a width).

window.kendoWindow({
    width: "500px",
    title: "Kendo Window",
    scrollable: false // or true
});

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mvbaffa
Top achievements
Rank 1
answered on 19 Oct 2011, 06:18 PM
Thanks you very much.
Tags
Window
Asked by
mvbaffa
Top achievements
Rank 1
Answers by
Petyo
Telerik team
mvbaffa
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or