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

Large Paging Optimizations

5 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 19 Nov 2013, 10:15 PM
Hi All!

Can you please tell me what you would advise as the best way of displaying a large number of records (IE: a page size of 500 to 1000)? 

Also, are there ways to optimize large quantities (IE: a page size of 10 and over 2000 items)?

Thanks,
Mark

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Nov 2013, 09:09 AM
Hi Mark,

You could use the functionality such as Custom Paging or Virtual Scrolling/Paging when you have a large data sets.
For understanding the functionality, go through the following demo on CustomPaging and Grid - Virtualization.

Thanks,
Princy
0
Mark
Top achievements
Rank 1
answered on 21 Nov 2013, 08:47 PM
Thanks!  I've actually tried the Custom Paging in the past.  The Virtual Scroll is new to me.  I have implemented it as per that link (in code behind though).  It "compacts" the data to the left, so that they do not match the width of the headers.  There is white space above, below and to the left of the rows.  Can can I fix this?

Thanks,
Mark
0
Princy
Top achievements
Rank 2
answered on 22 Nov 2013, 05:35 AM
Hi Mark,

I couldn't replicate the issue, below is a sample code that i tried, which works fine at my end. Please try it, if this doesn't help, provide your code snippet.

ASPX:
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

C#:
RadGrid RadGrid1;
protected void Page_Init(object source, System.EventArgs e)
 {
    RadGrid1 = new RadGrid(); 
    RadGrid1.MasterTableView.DataKeyNames = new string[] { "OrderID" };
    RadGrid1.Skin = "Default"
    RadGrid1.PageSize = 15;
    RadGrid1.AllowPaging = true;
    RadGrid1.AutoGenerateColumns = true;
    RadGrid1.VirtualItemCount = 750;
    RadGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed;
    RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
    RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
    RadGrid1.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
    RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
    RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = true;
    this.PlaceHolder1.Controls.Add(RadGrid1);
 }
 
void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
 {
    RadGrid1.DataSource = GetDataTable("SELECT * FROM Orders");
 }

Thanks,
Princy
0
Mark
Top achievements
Rank 1
answered on 22 Nov 2013, 03:55 PM
I have implemented custom paging that is only displayed for a certain subset of Users, but it still takes a long time to load 1000 records.  Virtual Paging, while nice, does not appear to be ideal.  Do you have any other suggestions?

Thanks,
Mark
0
Princy
Top achievements
Rank 2
answered on 25 Nov 2013, 07:08 AM
Hi Mark,

Please go through the following forum post which discuss about your required scenarios.
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-performance-large-table-with-scrolling-filtering-sorting.aspx#1676508
Also please provide your code snippet so that i can replicate the issues you are facing.

Thanks,
Princy
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Share this question
or