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

Pass parameter to Kendo Window with content of ParitialView

1 Answer 2093 Views
Window
This is a migrated thread and some comments may be shown as answers.
HSO
Top achievements
Rank 2
HSO asked on 22 Apr 2013, 04:17 AM
Hello:

I'd like to pass parameter of Kendo Window when a div clicked, the passed parameter will be the value of this Div, the Kendo Window renders from a partial view.

Razor view:

<div id="div1" onclick="divClicked" >50744</div>
 
@{Html.Kendo().Window()
        .Name("win1")
        .Visible(false)
        .Modal(true)
        .Height(400)
      .Content(@<text>
        @{Html.RenderAction("GetStandard", "Standard", new { eID=???});}
        </text>).Render();
    }
 
<script>
    $(document).ready(function () {
        $("#div1").on("click", divClicked);
    });
</script>
 
<script type="text/javascript">
    function divClicked() {
        var eID = $(this).text();
        $("#win1").data("kendoWindow").center().open();
}
</script>

When the DIV is clicked, the value is saved to eID, then I need to pass this eID to PartialView, like
 .../Standard/GetStandard?eID=50744

Please advise,

Thank you,

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 23 Apr 2013, 03:33 PM
Hello,

You could use the Window refresh method to load a partial view with a parameter from JavaScript.

Regards,
Daniel
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
HSO
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Share this question
or