Hide the close icon from a Window

7 posts, 1 answers
  1. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 18 Oct 2011 Link to this post

    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
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 19 Oct 2011 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 19 Oct 2011 Link to this post

    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
  5. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 19 Oct 2011 Link to this post

    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!
  6. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 19 Oct 2011 Link to this post

    Dimo,

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

    Thanks
  7. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 19 Oct 2011 Link to this post

    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!
  8. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 19 Oct 2011 Link to this post

    Thanks you very much.
Back to Top
Kendo UI is VS 2017 Ready