Eliyahu Goldin
Top achievements
Rank 1
Eliyahu Goldin
asked on 21 Jul 2009, 08:19 AM
Hello,
The datasource for my grid can can return from ten to tens of thousands records. I am using paging with 15 records per page and filtering. In a typical scenario, user gets first 15 records, then, depending on the number of records, locates the records he needs by paging and/or filtering. For cases of tens of thousands records, it makes sense to use customized paging with returning records for the current page only. I am not sure how it is going to work with filtering. My impression is that for filtering to work I need my datasource to return the full set of records, is that right?
What is the recommended way of filtering with customized paging?
Alternatively, how else can I optimize performance in my scenario?
The datasource for my grid can can return from ten to tens of thousands records. I am using paging with 15 records per page and filtering. In a typical scenario, user gets first 15 records, then, depending on the number of records, locates the records he needs by paging and/or filtering. For cases of tens of thousands records, it makes sense to use customized paging with returning records for the current page only. I am not sure how it is going to work with filtering. My impression is that for filtering to work I need my datasource to return the full set of records, is that right?
What is the recommended way of filtering with customized paging?
Alternatively, how else can I optimize performance in my scenario?
7 Answers, 1 is accepted
0
Hello Eliyahu,
There are cases in which you may want to fetch only a fixed number of records and perform operations over this specified set of data. Telerik RadGrid allows such data manipulation through the custom paging mechanism integrated in the control.
The main steps you need to undertake are shown in the following online demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
There are cases in which you may want to fetch only a fixed number of records and perform operations over this specified set of data. Telerik RadGrid allows such data manipulation through the custom paging mechanism integrated in the control.
The main steps you need to undertake are shown in the following online demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 23 Jul 2009, 10:38 PM
I know what is custom paging. The question was how does custom paging work with filtering? Any comments on that?
0
Hello Eliyahu,
Attached to this message is a simple working project which handles the desired functionality. Please give it a try and let me know if it works for you or if I am leaving something out.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Attached to this message is a simple working project which handles the desired functionality. Please give it a try and let me know if it works for you or if I am leaving something out.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 28 Jul 2009, 07:47 AM
The query in the example
reads the whole table thus filtering will be applied to the whole table.
For the customized paging the query will look like
With this, only 15 records will be returned and filtering will be applied to those 15 records only.
There doesn't seem to be a way of filtering against the whole table combined with retrieving one page of records at the time.
SELECT [OrderID],[RequiredDate],[ShipName],[ShipCity],[ShipCountry] FROM [Orders]
For the customized paging the query will look like
SELECT ROW_NUMBER() OVER (ORDER BY [RequiredDate]) AS [RowNumber], [OrderID],[RequiredDate],[ShipName],[ShipCity],[ShipCountry] FROM [Orders]
WHERE [RowNumber] BETWEEN 151 and 165
With this, only 15 records will be returned and filtering will be applied to those 15 records only.
There doesn't seem to be a way of filtering against the whole table combined with retrieving one page of records at the time.
0
Accepted
Hi Eliyahu,
When you have custom paging the only accessible items are the one on the current page.
In order to filter the whole table combined with retrieving one page of records you could temporarily disable paging, get all the items, and then re-enable paging again.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
When you have custom paging the only accessible items are the one on the current page.
In order to filter the whole table combined with retrieving one page of records you could temporarily disable paging, get all the items, and then re-enable paging again.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 30 Jul 2009, 08:57 PM
Thanks, this answers my question.
However I am not sure if your suggestion is practical. In case of thousands of records in the unfiltered dataset with no paging, getting the whole dataset may be unacceptably slow.
However I am not sure if your suggestion is practical. In case of thousands of records in the unfiltered dataset with no paging, getting the whole dataset may be unacceptably slow.
0
Hi Eliyahu,
Another possible option in case you need filtering all the items from the database, using custom paging is to implement custom filtering.
You have to handle manually filtering and paging, so you should be able to fetch records based on the applied filter, not only from the current page.
Sincerely yours,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Another possible option in case you need filtering all the items from the database, using custom paging is to implement custom filtering.
You have to handle manually filtering and paging, so you should be able to fetch records based on the applied filter, not only from the current page.
Sincerely yours,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.