Presently I am attempting to add paging to a Kendo Grid. Here is the full error message:
Error in event handler for (unknown): TypeError: Cannot read property 'url' of null
at Object.tinyFilter.start (chrome-extension://nlfgnnlnfbpcammlnibfkplpnbbbdeli/site.js:61:43)
at chrome-extension://nlfgnnlnfbpcammlnibfkplpnbbbdeli/site.js:137:16
Here is the code in my controller:
public ActionResult ExecuteRule(string ruleId, string ruleSql, List<MatchRuleParam> parameters = null)
{
if (Request.Url != null)
{
var query = PaginationQuery.Parse(Request.QueryString);
var upperLimit = query.FromUpper;
var lowerLimit = query.FromLower;
var dataSource = new MatchDataSource();
var results = dataSource.ExecuteTestRule(ruleId, ruleSql, parameters, upperLimit, lowerLimit).Select(k => new { KEY = k });
var response = new Dictionary<string, object>();
response["result"] = results;
response["rowCount"] = MatchDataSource.GetRowCount(ruleId, ruleSql, parameters);
return Json(response, JsonRequestBehavior.AllowGet);
}
return null;
}
When I try to put a breakpoint in chrome on the url line below, it does not stop in my JavaScript function:
function execRule() {
$.ajax({
type: 'POST',
url: "ExecuteRule",
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({
ruleId: PageState.Selected.RuleId,
ruleSql: PageState.SqlEditor.RuleSql.getValue(),
parameters: PageState.RuleParameters
}),
schema: {
errors: function(response) {
return response.error;
},
data: function(response) {
return response.result;
},
total: function(response) {
return response.rowCount;
}
},
success: function(matchedList) {
PageState.RuleResult = matchedList.result;
var dataSource = new kendo.data.DataSource({
data: matchedList.result
});
Grids.RuleResultsGrid.setDataSource(dataSource);
PageState.Selected.ChildKey = null;
updateButtonStates();
},
error: function(e) {
var errorObject = JSON.parse(e.xhr.responseText);
var errorMessage = errorObject.Message;
//clear old error message
//TODO: gridWidget.clearErrorMessage("error-message");
// add new error message
//TODO: gridWidget.addErrorMessage("error-message", errorMessage);
},
pageSize: 10,
requestEnd: this.onRequestEnd
});
The code works properly, except that for some reason the kendo grid has "undefined" and "NaN" which I have put red boxes around to highlight in this image:
The error happens as soon as I open the web page. Does anyone have any suggestions as to why I am receiving the TypeError? TIA.
UPDATE:
The "undefined" and "NaN" issue has been resolved, but now I can select various pageSize values, but when I do a grid refresh it is stuck with the value "10." Why is that occurring?