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

Window ActionsBuilder Clear() method not working

3 Answers 142 Views
Window
This is a migrated thread and some comments may be shown as answers.
Derrick
Top achievements
Rank 1
Derrick asked on 14 Mar 2013, 07:01 PM
I am using a Kendo Window for my application, and I want to remove the default Close button from the header. I am using the Clear() method, which by definition should clear out all actions. But when I run my application, the close button is still present on the window.

Here is the Razor code that builds the wondow. Notice the Actions section. Any help would be greatly appreciated! 
@(Html.Kendo().Window()
    .Name("LoadingWindow")
    .Visible(false)
    .Title("Loading...")
    .Modal(true)
    .Height(150)
    .Width(300)
    .Actions(a => a.Clear())
    .Content(@<text>
                  <div id="loading-details">Loading Data. Please wait.
                      <div id="divLoaderGif">
                          <img src="@Url.Content("~/Content/themes/ajax-loader.gif")" alt="Loading... Please wait..." />
                      </div>
                  </div>
              </text>)
)

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 18 Mar 2013, 09:57 AM
Hi Derrick,


Thank you for bringing this issue to our attention. It is indeed a bug and I have logged it for our development team to fix it. As a workaround you could specify the following CSS styles to manually hide the Close button.

E.g.
.k-window-action
{
   visibility: hidden ;
}

As a small sign of gratitude I updated your Telerik points. Wish you a great day!

 

Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Derrick
Top achievements
Rank 1
answered on 18 Mar 2013, 05:01 PM
Thanks, Dimiter. I appreciate the help. Unfortunately, this will not work since I have other Kendo Windows that we use in this app (which we DO want the buttons displayed). And adding this CSS code will hide buttons on all windows. I may need to just wait for the bug fix, and we'll just let the button be visible for now. 
0
Dimiter Madjarov
Telerik team
answered on 19 Mar 2013, 08:41 AM
Hi Derrick,


You could add a custom class to the windows, where the buttons need to be hidden.
E.g.
@(Html.Kendo().Window()
    .Name("window")
    .HtmlAttributes(new { @class = "no-buttons" })

And then hide them via jQuery
E.g.
$(".no-buttons").prev(".k-window-titlebar").find(".k-window-action").hide();

I hope this approach will work in you scenario.

 

Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Derrick
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Derrick
Top achievements
Rank 1
Share this question
or