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

ajaxRequest Works Only The First Time?

1 Answer 146 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 22 Feb 2012, 06:12 AM
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.


1 Answer, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 22 Feb 2012, 06:24 AM
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 });
     
},
Tags
Splitter
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Share this question
or