0

I am using the HandsonTables and I can get it to display the Grid with the correct number of Columns and even got it to display the correct Headers. Problem is my buttons do not seem to work. My View has

// GET method, gets data from the Controller
Handsontable.Dom.addEvent(load, 'click', function () {
    jQuery.ajax({
        url: '/Home/GetCar', //Controller to Get the JsonResult From -- Json(jsonData, JsonRequestBehavior.AllowGet);
        type: "GET",
        dataType: "json",
        contentType: 'application/json; charset=utf-8', // dataType and contentType should be json
        async: true,
        processData: false,
        cache: false,
        success: function (data) { // on Success send the Json data to the table by using loaddata function
            //alert(data);
            hot.loadData(data);
            exampleConsole.innerHTML = 'Data loaded';
        },
        error: function (xhr) {
            alert('error');
        }
    });
});

and the Controller is

public JsonResult GetCar()
{
    var jsonData = new[]
    {
         new[] {" ", "Kia", "Nissan", "Toyota", "Honda", "Mazda", "Ford"},
         new[] {"2012", "10", "11", "12", "13", "15", "16"},
         new[] {"2013", "10", "11", "12", "13", "15", "16"},
         new[] {"2014", "10", "11", "12", "13", "15", "16"},
         new[] {"2015", "10", "11", "12", "13", "15", "16"},
         new[] {"2016", "10", "11", "12", "13", "15", "16"}
    };
    return Json(jsonData, JsonRequestBehavior.AllowGet);
}

I am at a loss as to why it is not working.

I have set Debug marks in the Controller but when I click on the "Load" Button it doesn't jump to the controller.

0