Model:
[
OperationContract]
public GridModel GetSalesOrders(GridState state)
{
return new DBHelper().ExecuteSql(Settings.Default.SalesOrderSelectSql, state);
}
View:
@(Html.Telerik().Grid<System.Data.
DataRow>()
.Name(
"SalesOrders")
.DataKeys(dataKeys => dataKeys.Add(
"OrderId"))
.Columns(columns =>
{
columns.Bound(
typeof(int), "OrderId").Width(100);
columns.Bound(
typeof(string), "CustomerName").Width(200);
columns.Bound(
typeof(string), "CustomerEmail");
})
.DataBinding(dataBinding => dataBinding.WebService().Select(
"~/Models/DataServices.svc/GetSalesOrders"))
.Pageable()
)
Controller:
public
ActionResult Index() {
return View();
}
Problem:
It says problem id - 12152
This is my first attempt towards using MVC Telerik Grid, so I might be doing something really silly..
Any help?