This is a migrated thread and some comments may be shown as answers.
Hide Close icon window
1 Answer 72 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Peter
Top achievements
Rank 1
Peter asked on 27 Oct 2011, 01:29 PM
Hi,

I would like to hide the close (X) icon on a modal window created via  two options..

1)
 anotherDialog = $.telerik.window.create({
            name: "Dialog",
            title: "SomeDialogr",
            html: "Some HTML",
            modal: true,
            resizable: true,
            draggable: true,
            width: 600,
            height: 150,
            visible: true
        });

2) 

    <% Html.Telerik().Window()
           .Name("WOLock")
           .Title("WoLock")
           .Width(380)
           .Height(180)
      ....etc

Any help with the two scenarios would be appreciated

If the Icon cannot be hidden is there a way to disable the onClose event when the user clicks (X)

Thanks,
  Peter

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Oct 2011, 03:09 PM
Hello Peter,

Here is how to achieve the desired look:

1)

$.telerik.window.create({
     name: "Dialog",
     actions: []
});


2)

The server-side ability to hide the Close button will be introduced today with the Q3 2001 beta release.

Html.Telerik().Window().Buttons(b => b.Clear())

An alternative approach is to append a custom CSS class to the Window via HtmlAttributes() and then use CSS:

.HtmlAttributes(new { @class = "noButtons"})

.noButtons .t-window-actions .t-close
{
    display:none;
}


All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Window
Asked by
Peter
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or