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

kendoWindow always visible at page load

2 Answers 1083 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 17 Sep 2012, 07:23 PM
Hi, I must be doing something wrong. No matter what I do, I cannot get the page to load with the kendoWindow hidden.  I am prototyping this therefore I have very minimal code, here is the entire page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ScratchPad.Default" %>
 
<!DOCTYPE html>
 
<html lang="en-us">
<head runat="server">
	<meta charset="utf-8" />
    <title></title>
	<link href="Content/kendo/kendo.common.min.css" rel="stylesheet" type="text/css" />
	<link href="Content/kendo/kendo.metro.min.css" rel="stylesheet" type="text/css" />	
	<link href="Content/default.css" rel="stylesheet" type="text/css" />	
	<script src="Scripts/jquery-1.8.1.js" type="text/javascript"></script>
	<script src="Scripts/newKendo/kendo.web.min.js" type="text/javascript"></script>
</head>
 
<body>
    <form id="form1" runat="server">
    <div>
    <asp:button id="btnOpenDiv" runat="server" text="Click Me!" />
    </div>
 
	<div id="dlgWindow">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
		Nullam in tellus tincidunt leo consequat tempor. Quisque 
		pellentesque magna vitae elit consectetur venenatis. 
		Nam ornare tristique magna, sed feugiat felis pellentesque 
		vestibulum. Donec et dui erat, non vehicula dui. Aenean 
		tincidunt nisl nisi, at posuere eros. Proin aliquet 
		adipiscing vestibulum. Aliquam aliquam leo non sem pulvinar 
		cursus. In dolor tellus, volutpat id pharetra a, tristique 
		non arcu. Maecenas ac est vitae nisi hendrerit dapibus. 
		Phasellus varius, arcu a sodales adipiscing, nunc nisl tempus 
		turpis, ut posuere eros dui eu purus. Sed diam elit, elementum 
		in fermentum eget, fringilla a purus.</p>
	</div>
    </form>
	
	<script>
		    $(document).ready(function()
		    {
			var window = $("#dlgWindow");
 
			var btn = $("#<%= btnOpenDiv.ClientID %>");
 
			btn.bind("click", function()
			{
			    window.data("kendoWindow").open();
			});
 
			window.kendoWindow(
			{
			    width: "500px",
			    height: "200px",
			    center: "True",
			    visible: "False"			
			});			
		    });
	</script>
</body>
</html>

Basically, what I'm trying to do is have the page load with just the button visible then when I click the button I would like the kendoWindow to open.  After the page loads, if I close the kendoWindow and click the button, it opens but it's not centered. I am just getting a little frustrated, any help at all would be greatly appreciated.
Thanks!
-Sean

2 Answers, 1 is accepted

Sort by
0
Sean
Top achievements
Rank 1
answered on 24 Sep 2012, 01:52 PM
Can't anyone tell me how to open a page with a kendoWindow minimized?
0
Nohinn
Top achievements
Rank 1
answered on 25 Sep 2012, 09:05 AM
The visible property of the kendoWindow is a boolean, not an string
window.kendoWindow(
            {
                width: "500px",
                height: "200px",
                visible: false         
            }).data('kendoWindow').center();
Tags
Window
Asked by
Sean
Top achievements
Rank 1
Answers by
Sean
Top achievements
Rank 1
Nohinn
Top achievements
Rank 1
Share this question
or