Datasource to a Webservice

1 posts, 0 answers
  1. George
    George avatar
    18 posts
    Member since:
    Aug 2007

    Posted 17 Apr 2012 Link to this post

    I am a new KendoUI/Jquery/Javascript developer and I am having the following issue. 
    The ajax call is working ($.ajax(GetAirportList)), so I know the webservice is ok.
    When the airportListDataSource is invoked, no data is loaded and the Javascript console (in Chrome) is 
    giving me the message "Uncaught RangeError: Maximum call stack size exceeded"

    Please help!
     
    var airportList = {};

            var GetAirportList = {
                type: "POST",
                url: "OWLV2be.asmx/GetAirportList",
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (msg) {
                    airportList = msg;
                }
            };

            var airportListDataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        type: "POST",
                        url: "OWLV2be.asmx/GetAirportList",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json"
                    }
                }
            });

            $(document).ready(function () {
                $.ajax(GetAirportList);

                $("#airpAirport").kendoDropDownList( {
                    dataTextField: "airportName",
                    dataValueField: "airportCode",
                    dataSource:  airportListDataSource
                });
Back to Top