ToValhalla
ToValhalla

Reputation: 11

Kendo Window does not firing server side button

I use in my Project telerik kendo ui, so I use kendo window, but button which inside kendo window does not firing click event. I try multiple different style but it seems not working. here my window html. and some javascript.

<div class="row">
    <div class="col-md-7">
        <div class="input-group">
             <asp:TextBox runat="server" ID="txtUpgradePrice" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
             <span class="input-group-addon"></span>
             <asp:Button Text="SendITTTT" CssClass="btn btn-danger" ID="btnSendNewPrice" runat="server" OnClick="btnSendNewPrice_Click" />
             <asp:LinkButton Text="Send it" CssClass="btn btn-danger" ClientIDMode="Static" ID="btnSendPrice" OnClick="btnSendNewPrice_Click" runat="server" />

         </div>
         <br />                                   
     </div>

 <script>
    $(document).ready(function () {var myWindow3 = $("#myModalNew").kendoWindow({
            modal: true,
            width: "800px",
            draggable: false,
            visible: false,
            resizable: false,
        }).data("kendoWindow");

        $("#openBtn").on("click", function () {
            myWindow3.center();
            myWindow3.open();
        });

        $("#newModelClose").on("click", function () {
            myWindow3.close();
        });  });
    function ShowLabel() {
        // Note that the client ID might be different from the server side ID
        document.getElementById('lblPriceState').style.display = 'inherit';
    }
</script>

Do you have any information about kendo block server side in asp.net..

Upvotes: 0

Views: 1575

Answers (2)

ToValhalla
ToValhalla

Reputation: 11

Finally I found answer. I did some research and you know kendo window and jquery dialog work. Anyway, the problem which identified in here problem is same so if you put your javascript like this

 var myWindow2 = $("#myModal").kendoWindow({
            modal: true,
            width: "800px",
            draggable: false,
            visible: false,
            resizable: false,
            iframe: false //<-- Iframe set to false
        }).data("kendoWindow");

        var modal2 = $("#myModal").kendoWindow();
        modal2.parent().appendTo(jQuery("form:first"));//Added this line

now server side button which inside kendo window firing click event..., Thanks.

Upvotes: 1

Dalorzo
Dalorzo

Reputation: 20014

When you create your kendoWindow remove the iframe option like:

$("#dialog").kendoWindow({
  content: "http://ticodificando.com/",
  iframe: false
});

Or from your example above:

$(document).ready(function () {
       var myWindow3 = $("#myModalNew").kendoWindow({
            modal: true,
            width: "800px",
            draggable: false,
            visible: false,
            resizable: false,
            iframe: false //<-- Iframe set to false
        }).data("kendoWindow");
...

Upvotes: 0

Related Questions