This question is locked. New answers and comments are not allowed.
So, I've got this grid, and I'm using an Ajax call to update it. I can't do it the way suggested in the demo or manual, because it relies on values from selects on the page. So, using the client-side api, I've implemented updating. However, it does not seem to work.
In Firefox 6, I get an error this.dataSource is undefined.
In Chrome, I get "Uncaught TypeError: Cannot call method 'success' of undefined"
Here's my code for the grid:
In Firefox 6, I get an error this.dataSource is undefined.
In Chrome, I get "Uncaught TypeError: Cannot call method 'success' of undefined"
Here's my code for the grid:
@(Html.Telerik().Grid(Model)
.Name("DataTable")
.Columns(columns =>
{
columns.Bound(c => c.LastName);
columns.Bound(c => c.FirstName);
}
)
.Pageable()
.Footer(true)
.Sortable()
)
The Javascript:
function (data) {
var grid = $("#DataTable").data("tGrid");
var gridContents = data.Data;
grid.dataBind(gridContents);
}
And the code that returns the data:
return Json(new
{
Data = new GridModel { Data = grid, Total = grid.Count },
TotalCount = users.Count,
Results = CourseResults
}, JsonRequestBehavior.AllowGet);
The other members of the returned JSON object are for other parts of the page.
Any ideas?