ajaxRequest Works Only The First Time?

2 posts, 0 answers
  1. Shawn
    Shawn avatar
    2 posts
    Member since:
    Nov 2011

    Posted 22 Feb 2012 Link to this post

    Am am trying to use splitter.ajaxRequest when an item from a grid of item(s) is selected.

    Item is selected and splitter.ajaxRequest updates the specified pane loads correctly.  I would like the pane to reload using splitter.ajaxRequest when the selected item changes.

    I get the error "Cannot call method 'ajaxRequest' of undefined"
    change: function(e) {
        var row = this.select();
        var id = row.data("id");
        var splitter = $("#mySplitter").data("kendoSplitter");
        splitter.ajaxRequest("#pane1", "?p=user", { id: id });
         
    }

    Thanks for the help.


  2. Shawn
    Shawn avatar
    2 posts
    Member since:
    Nov 2011

    Posted 22 Feb 2012 Link to this post

    I figured out my error after post.

    change: function(e) {
        var row = this.select();
        var id = row.data("id");
        //var splitter = $("#mySplitter").data("kendoSplitter");
        splitter.ajaxRequest("#pane1", "?p=user", { id: id });
         
    },

    I moved the var splitter line out off the grid change function. 

    Code that worked:
    $("#ticket_view_pane").height(700).trigger("resize");
    var splitter = $("#mySplitter").kendoSplitter({
        panes: [
            { size: "700px",
              //contentUrl: "?p=user",
            }
        ],
        orientation: "vertical"
    }).data("kendoSplitter");
    pageable: true,
    selectable:true,
    change: function(e) {
        var row = this.select();
        var id = row.data("id");
        //var splitter = $("#mySplitter").data("kendoSplitter");
        splitter.ajaxRequest("#pane1", "?p=user", { id: id });
         
    },
  3. Kendo UI is VS 2017 Ready
Back to Top