Hi there
In this example:
$("#employeeGridDiv").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: {
type: 'GET',
contentType: "application/json; charset=utf-8",
dataType: "json",
url: '@Url.Action("LoadEmployeeGrid", "EmployeePanel")'
}
},
pageSize: 20
},
groupable: true,
sortable: true,
pageable: {
refresh: true,
pageSizes: true,
buttonCount: 5
},
columns: {
type: 'GET',
contentType: "text/html",
url: '@Url.Action("LoadEmployeeGridColumns", "EmployeePanel")'
}
});
I'm trying to populate the columns from the controller method LoadEmployeeGridColumns which returns the JSON representation of the following:
public class GridCellClass
{
public string field { get; set; }
public string title { get; set; }
public string template { get; set; }
public int width { get; set; }
public bool visible { get; set; }
public string format { get; set; }
public string attributes { get; set; }
}
It does not work. How exactly should the "columns" portion be implemented?
Thanks.