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

Deal with large dataset retrieve with paging

3 Answers 301 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CH
Top achievements
Rank 1
CH asked on 30 Jun 2011, 08:45 AM
Dear Sir:
   I have a radgrid with paging for search result, when the user search a large number of record and it take long time to retrieve the data from the stored procedue . In fact, the user normally just look at the first few page in the grid only but they still have suffer the time for get the whole result set from the database. is there anyway/sample to retrieve the record by page and how can i handle the sorting and filtering?

From CH

3 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 05 Jul 2011, 10:35 AM
Hello Ch,

You can take advantage of the LINQ queries support of RadGrid (under .NET 3.5) to speed up the filtering functionality as much as possible. This should reduce the loading time of the control to a great extent.
The other way is to use custom paging. By using Custom paging, it is possible 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. Checkout the following link for more information about custom paging in RadGrid: Custom paging
Also refer the following links which explain about Client/server grid performance optimizations.
http://www.telerik.com/help/aspnet-ajax/grid-viewstate-reduction-techniques.html
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-performance-large-table-with-scrolling-filtering-sorting.aspx

I hope this helps.

Kind regards,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
CH
Top achievements
Rank 1
answered on 01 Aug 2011, 07:54 AM
Linq may be not the way for my issue because i am using the stored procedue and the Linq may not able to cache the resultset. if i want to use the custom paging then do i need to handle the sorting? is there any example i can follow?

Best regards

CH
0
Radoslav
Telerik team
answered on 04 Aug 2011, 03:56 PM
Hi Ch,

You could try using the example from this link (Custom paging, grouping and filtering on 100000 items using ObjectDataSource) and into the MyBusinessObjectCollection's Select method you could add additional parameters for grid's sort expressions and filter expressions. For example:
 
public List<MyBusinessObject> Select (int startIndex, int maximumRows,
            string sortExpressions, List<GridFilterExpression> filterExpressions)
{
   ...
}

Then you could pass all parameters to your stored procedure.
Additionally please check out the following threads which elaborate on the same matter:
http://www.telerik.com/community/forums/aspnet/grid/filtering-and-paging-simultaneously-in-objectdatasource.aspx
http://www.telerik.com/community/forums/aspnet/grid/radgrid-cannot-pass-sortexpression-to-objectdatasourcecontrol.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-custom-paging-using-objectdatasource.aspx

Another way to achieve the desired functionality is to use the client side databinding and into an web service's select method to get all parameters and call the stored procedure with them. For more information please check out the following online example:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx

I hope this helps.

Greetings,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
CH
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
CH
Top achievements
Rank 1
Share this question
or