This question is locked. New answers and comments are not allowed.
Hi there,
well my first post, and is a cuestion (the usuall i supouse)
I'm having a little trouble to get centered a telerik window...
for some reason, the "center()" method is not available to call it.
it was tested with the demo page in IE and the method is there, but when im trying to put the same code on my application, just dont appears....
attached are a couple of pics to make more graphical
this happens on IE(7) - cause Chrome does what i want.
can anybody tell me why is this happen????
This is my master page:
My View:
thanks in advance...
well my first post, and is a cuestion (the usuall i supouse)
I'm having a little trouble to get centered a telerik window...
for some reason, the "center()" method is not available to call it.
it was tested with the demo page in IE and the method is there, but when im trying to put the same code on my application, just dont appears....
attached are a couple of pics to make more graphical
this happens on IE(7) - cause Chrome does what i want.
can anybody tell me why is this happen????
This is my master page:
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <% Html.Telerik() .StyleSheetRegistrar() .DefaultGroup(group => group .Add("telerik.common.min.css") .Add("telerik.simple.min.css") .Add("telerik.rtl.min.css") .Add("main.css")) .Render(); %> </head> <body> <!-- Inicio Div Principal --> <div id="global"> <!-- Información Ejecutivo --> <p class="ejecutivo"> <%: Html.Label("Ejecutivo:") %> <%: Html.Label("Rodrigo Contreras") %> <%= Html.ActionLinkImage("Salir", "Salir", HelpersAMS.TipoLink.dinero) %> </p> <div class="navigation"> <ul class="tabs" id="main-nav"> <li><%: Html.ActionLink("Bitácora", "Index", "Home")%></li> <li><%: Html.ActionLink("Modulos Comunes", "About", "Home")%></li> <li><%: Html.ActionLink("TestWindow", "TestWindow", "Home")%></li> </ul> </div> <!-- Inicio Div Main --> <div id="main"> <!-- Inicio Contenido Principal --> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> </div> <div id="footer"> <div class="site-id"> <img src="../../Content/Images/logo-banco.gif" alt="Logo Banco Security"/> </div> </div> </div> <%= Html.Telerik().ScriptRegistrar() %> </body> </html> My View:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Principal.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> <style type="text/css"> .example form { width: 430px; height: 370px; float: right; } #undo { text-align: center; position: absolute; white-space: nowrap; border-width: 1px; border-style: solid; padding: 2em; cursor: pointer; } </style> TestWindow </asp:Content> <asp:content ID="Content2" contentPlaceHolderID="MainContent" runat="server"> <% Html.Telerik().Window() .Name("Window") .Title("Telerik Window for ASP.NET MVC") .Draggable(true) .Resizable(resizing => resizing .Enabled(true) .MinHeight(250) .MinWidth(250) .MaxHeight(500) .MaxWidth(500) ) .Modal(false) .Buttons(b => b.Maximize().Close()) .Content(() => {%> <p style="text-align: center"> <img src="<%= Url.Content("~/Content/Window/window.png")%>" alt="Window for ASP.NET MVC logo" style="display:block;margin:0 auto 10px;" /> The Telerik Window for ASP.NET MVC is<br /> the right choice for creating Window dialogs<br /> and alert/prompt/confirm boxes<br /> in your ASP.NET MVC applications. </p> <%}) .Width(300) .Height(300) .Render(); %> <% Html.Telerik().ScriptRegistrar() .OnDocumentReady(() => {%> var lovelyWindow = $('#Window'); var undoButton = $('#undo'); undoButton .bind('click', function(e) { lovelyWindow.data('tWindow').center().open(); undoButton.hide(); }) .toggle(!lovelyWindow.is(':visible')); lovelyWindow.bind('close', function() { undoButton.show(); }); <%}); %> <span id="undo" class="t-group">Click here to open the window.</span> </asp:content>thanks in advance...