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

[Solved] Optimalization of databind

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
chan
Top achievements
Rank 1
chan asked on 17 Apr 2009, 09:46 AM
Hi
     I get a method which can return records as a dataset,and i set the dataset as data source of a radgrid as following
 
    protected void dgvUnselect_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        UserSessionContainer usc = USCHelper.GetUserSessionContainer(Session); 
        DataSet items = Product.Product_SelectAll_ByCustomerId_And_ByProductDescription_AsDataSet(usc.Selected_CouponId); 
        this.dgvUnselect.DataSource = items; 
    } 
The problem is that there are large amount records(more than 100000) in this dataset,so this page  is very laggy. I've already read this article http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx, and i do not think it is useful for me, i just wonder if there is any solution in other ways which do not use the "ObjectDataSource",because i must get records from method Product.Product_SelectAll_ByCustomerId_And_ByProductDescription_AsDataSet(usc.Selected_CouponId)

 Regards

Chan

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 22 Apr 2009, 06:46 AM
Hello Chan,

Generally speaking the best approach if you have that amount of data is to retrieve only on PageSize records from your data base. You can achieve this by using enabling RadGrid custom paging and set proper VirtualItemCount or use DataSource control that support paging as ObjectDataSource for example.

Best wishes,
Nikolay
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.
Tags
Grid
Asked by
chan
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or