This is a migrated thread and some comments may be shown as answers.

Kendo ui Ajax binding paging thrpwing js error

4 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gangadhar
Top achievements
Rank 1
Gangadhar asked on 30 Jun 2014, 01:49 PM
Hi There,

I am currently working on Kendo Grid. I have implemented ajax binding with default paging using the below link
http://docs.telerik.com/kendo-ui/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/ajax-binding

In ie10 i am getting a javascript error in aspnetmvc.min.js file before the pageload. once page loaded everything is working perfectly.
below is the code i have used.

I am using  Kendo.MVC.dll and KendoAjaxBinding.Model.dll of version v4.0.30319

.cshtml
--------
<div>
@(Html.Kendo().Grid<KendoUIAjaxBinding.Model.PM_ANO>()

.Name("grid")
.DataSource(dataSource => dataSource

.Ajax()

.Read(read => read.Action("Products_Read", "Home")

.Data("productsReadData")
)
)
.Columns(columns =>
{
columns.Bound(anomaly => anomaly.GOD);
columns.Bound(anomaly => anomaly.VER);
// Create a column bound to the ProductID property
columns.Bound(anomaly => anomaly.C_ANO);
// Create a column bound to the ProductName property
columns.Bound(anomaly => anomaly.Y_ANO);
// Create a column bound to the UnitsInStock property
columns.Bound(anomaly => anomaly.Z_REP_AUTO);
})
.Pageable(x => x.PageSizes(true)) // Enable paging
.Sortable() // Enable sorting
)
</div>



in Layout page i have rendered like this
----------------------------------------
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />


<script src="~/Scripts/jquery-1.7.1.js"></script>
<script src="~/Scripts/Kendo/kendo.web.min.js"></script>
<script src="~/Scripts/Kendo/kendo.aspnetmvc.min.js"></script>

</head>

controller code
------------------
public JsonResult

Products_Read([DataSourceRequest]DataSourceRequest request, string firstName, string lastName)
{

var _context = new E2A_GUIEntities();

IQueryable<PM_ANO> anomaly = _context.PM_ANO;


var total = anomaly.Count();

if (request.Page > 0)
{
anomaly = anomaly.OrderBy(a => a.C_ANO).Skip((request.Page - 1) * request.PageSize);
}
anomaly = anomaly.Take(request.PageSize);
var result = new DataSourceResult()
{
Data = anomaly, // Process data (paging and sorting applied)
Total = total // Total number of records
};

return Json(result, JsonRequestBehavior.AllowGet);

}

Please help me in resolving this.


Thanks and Regards,
Gangadhar.

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 02 Jul 2014, 06:42 AM
Hi Gangadhar,

I'm afraid that it is not clear what may cause error or what the error is by looking at the provided information. However, I have noticed that you are using an older (1.7.1) than the min. required (1.9.1)  version of jQuery. Therefore, please update the jQuery and see if the issue still exists. Also you may upgrade to the latest Kendo UI release.

If you continue to experience difficulties please provide a small runnable sample in which the issue can be observed locally.

Regards,
Rosen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Gangadhar
Top achievements
Rank 1
answered on 02 Jul 2014, 08:19 AM
Hi Rosen,

Thank you for the response. Will  upgrade and let you know.


Thanks and Regards,
Gangadhar.
0
Gangadhar
Top achievements
Rank 1
answered on 03 Jul 2014, 02:35 PM
Hi Rosen ,


How do i get the latest kendo DLL'd ? like  Kendo.MVC.dll  ?


Thanks and Regards,
Gangadhar..
0
Rosen
Telerik team
answered on 03 Jul 2014, 02:40 PM
Hi Gangadhar,

You can download the latest release of UI for ASP.NET MVC from your account here.

Regards,
Rosen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Gangadhar
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Gangadhar
Top achievements
Rank 1
Share this question
or