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

Grid with 100,000s records. Issue with ServerOperation & filtering

2 Answers 1077 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 12 Jul 2016, 12:21 PM

I have a Kendo grid that is pulling 100,000s of records.
If the .ServerOperation(false) Kendo does not load any data.
If I set it to .ServerOperation(true) it will load the data however the search filters do not work.

What am I missing?
Is there a way to use .ServerOperation(false) with 100,000ss of records?

<div class="grid">
            @(Html.Kendo().Grid<BusinessApplication.DTO.DTOMemberGrid>().Name("grid")
                .Columns(col =>
                {
                    col.Bound(m => m.MemberID).ClientTemplate("<a href='/members/view/#=MemberID#' class='block'>#=MemberID#</a>").Width(100).Title("ID");
                    col.Bound(m => m.PersonsTitle).Width(100).Title("Title");
                    col.Bound(m => m.FirstName);
                    col.Bound(m => m.LastName);
                    col.Bound(m => m.JobTitle);
                    col.Command(command => command.Custom("View")
                        .Click("EditItem"))
                        .Width(100)
                        .Title("View")
                        .HtmlAttributes(new { @class = "k-grid-details text-center", title = "View" })
                        .HeaderHtmlAttributes(new { title = "View" });
                })
 
                 
                // Source & configuration
                .DataSource(src => src
                                    .Ajax()
                                    .PageSize(10)
                                    .ServerOperation(true)
                                    .Sort(sort => sort.Add("MemberID").Descending())
                                    .Read(read => read.Action("GetMembersGridItems", "Members")))
                                .AutoBind(true)
                                .Sortable()
                                .Resizable(resize => resize.Columns(true))
                                .ColumnMenu()
                                .Scrollable(s => s.Height("auto"))
                                .Pageable(pageable => pageable
                                .Refresh(true)
                                .PageSizes(new[] { 10, 50, 100, 500 })
                                .ButtonCount(10))
                                .Filterable(filter => filter
                                    .Operators(op => op.ForDate(date => date
                                        .Clear()
                                        .IsGreaterThanOrEqualTo("Is after or equal to")
                                        .IsLessThanOrEqualTo("Is before or equal to"))))
                                .Reorderable(reorder => reorder.Columns(true))
            )
        </div>

 

Thanks

Tom

 

 

 

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 14 Jul 2016, 08:48 AM
Hello Tom,

Regarding the server operations, could you please ensure that you are following the suggestions from the following help topic for Ajax Binding:
As for the failed filtering, if you are using ToDataSourceResult method it will sort, page, filter, etc. However, you can inspect the browser's console and see if there are errors when you enable the server operation and try to filter. Server-side error will prevent the Grid from binding to the filtered data (if it is correctly filtered on the server).

As for your other question, handling such amount of records on client-side will be extremely difficult, especially if you need to perform sorting, paging and filtering, but you can inspect the browser's console in this scenario as well and see if there are errors that prevent the grid from binding correcly.


Regards,
Konstantin Dikov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Tom
Top achievements
Rank 1
answered on 20 Jul 2016, 10:00 PM

Thanks Konstantin

I was missing square brackets around the DataSourceRequest.

Should have been:

public DataSourceResult GetAllDTOMemberGrid([DataSourceRequest] DataSourceRequest request)        {

 

 

 

Tags
Grid
Asked by
Tom
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Tom
Top achievements
Rank 1
Share this question
or