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

Help understanding Paging

5 Answers 300 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 18 May 2018, 04:52 PM

I have a grid with a large dataset that I want to limit by querying data in pages.  The Stored Procedure works fine in the paging process.  If I do not set the DataSourceResult.Total value the grid does not allow the user to click the ">" icon in the paging section, as if it sees no records. 

If I do set the total to how many records actually exist (9000 in this scenario) the grid comes up with no records.

 

Here are the lines before the Read() method returns ..

1) IQueryable<ROHS> res = viewModel.Data.AsQueryable<ROHS>();

2) DataSourceResult data = res.ToDataSourceResult(request);

3) return Json(data);

 

I can see in the debugger that res.Results View (1) shows the 100 records.

As soon as (2) happens the "Data" member of the DatasourceResult object has not records.

Can someone point out what I am doing wrong here?

Thanks

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 23 May 2018, 08:15 AM
Hello Reid,

Thank you for the provided code.

I have investigated it and I did not notice anything that might cause an issue. The ToDataSourceResult extension method will page, filter, sort, or group your data using the information provided by the DataSourceRequest object. I assume that the issue might be caused due to а invalid DataSourceRequest parameter.

Could you please make sure that the page and pageSize properties of the DataSourceRequest parameter have values?

Having said that, sharing a demo that clearly replicates the issue would definitely help us fully understand the case and we will be able to provide further assistance to the best of our knowledge.

I look forward to your reply.


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Reid
Top achievements
Rank 2
answered on 08 Jun 2018, 05:00 PM
I am not really sure what is going wrong here but have cached the data in a different way and got it working.  Sorry for the delay and thanks for the help.
0
Reid
Top achievements
Rank 2
answered on 02 Jul 2018, 02:34 PM
I just defaulted back to getting all the records, all 8000 of them and letting Kendo do the paging.  It works but not as I would like it.  I wanted to control the data requests in the controller, only getting a chunk at a time.  :(
0
Accepted
Georgi
Telerik team
answered on 04 Jul 2018, 06:49 AM
Hi Reid,

I would recommend you to take a look at the following article which explains how to configure the action method for server operations step by step:


Furthermore, we have a demo which demonstrates server operations:


Having said that, sharing a demo that clearly replicates the issue would definitely help us fully understand the case and we will be able to provide further assistance to the best of our knowledge.


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Reid
Top achievements
Rank 2
answered on 05 Jul 2018, 12:26 PM
Ok I will check that out, thanks.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Georgi
Telerik team
Reid
Top achievements
Rank 2
Share this question
or