How to pass parameters to window

2 posts, 1 answers
  1. Vince
    Vince avatar
    7 posts
    Member since:
    Apr 2013

    Posted 11 May 2013 Link to this post

    Hi I'm fairly new in web development so please excuse my ignorance. I'm using the grid and have a custom toolbar command. When the custom command is clicked and a row is selected I want to pass the selected row data to the window. Can someone please tell me what would be the correct/preferred way to do this? Right now I have the selected row data and I can pop up my window. I read through the forums and some hinted about a partial view?? I'm assuming you would have the window display the partial view which has your model of data that you would want to send back to the server when the user clicks a save button for example but as I said I also want to display the additional row data in the window.

    Any help would greatly be appreciated especially with a basic example of how to call a window and pass data from the main page.

  2. Answer
    Vince avatar
    7 posts
    Member since:
    Apr 2013

    Posted 11 Jun 2013 Link to this post

    I just set the value and html using jquery before opening the window e.g.

    else if (command == COMMAND.COMMENT) {
        $('#Account').html("<label>Account:</label>" + dataItem.Site.Account);
        $('#VisitDate').html("<label>Visit Date:</label>" + kendo.format("{0:D}", dataItem.VisitDate));
        var commentWindow = $("#commentWindow").data("kendoWindow").center().open();
Back to Top