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

[Solved] MVC Grid Paging problem

0 Answers 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Arian
Top achievements
Rank 1
Arian asked on 25 Oct 2011, 09:48 PM
Hi

I have a problem with mvc grid paging.

The problem is, it doubles some records, and hides some other. The resultset returns 17 unique records. The grid displays 17 records, but some of them are duplicates and some are missing.

I checked the resultset and it returns all unique records. The result comes from Entity Framework.


here is the binding code

<% Html.Telerik().Grid(Model).Name("lsCourses").Columns(columns =>{
			columns.Bound(o => o.CourseID).Title("Course id").Template(t => "<a href='#' onclick='detailWindow(\"" + t.CourseID + "\"); return false;'>" + t.CourseID + "</a>").ClientTemplate("<a href='#' onclick='detailWindow(\"<#= CourseID #>\"); return false;' ><#= CourseID #></a>").Width(80);
			columns.Bound(o => o.CourseName).Title("Name").Width(240);
            columns.Bound(o => o.ProgramName).Title("Program Name").Width(220);			
			columns.Template(o => {%> <button onclick='editCourse("<%= o.CourseID %>");' class='t-button'>Edit</button> <% 
            }).ClientTemplate("<button onclick='editCourse(\"<#= CourseID #>\");' class='t-button'>Edit</button>").Title("Edit").Width(80);
		})
		.Scrollable(scrolling => scrolling.Enabled(true)).Scrollable(c => c.Height("280px"))
		.Sortable(sorting => sorting.Enabled(true))        
		.Pageable(paging => paging.Enabled(true).PageSize(7))
		.Filterable(filtering => filtering.Enabled(true))
		.Groupable(grouping => grouping.Enabled(true))
		.Resizable(resizing => resizing.Columns(true)).DataBinding(b => b.Ajax().Select("_Index""Courses"))
		.Footer(true).Render();%>

Can someone help me on this?
Tags
Grid
Asked by
Arian
Top achievements
Rank 1
Share this question
or