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

Trouble with RadGrid Virtualization AND Custom Paging

3 Answers 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 27 Jan 2014, 06:09 PM
I am trying to get a RadGrid to support both Virtualization and Custom Paging.  I can get either to work fine, but not both together.  This is my code for NeedDataSource below.  It seems that CurrentPageIndex  is always set to 0.  I would expect that to increment with the virtual scrolling.

  protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            
            int startRowIndex = RadGrid1.CurrentPageIndex * RadGrid1.PageSize;
            int maxRows = RadGrid1.PageSize;
            var reportDetails = DataAccess.GetReportDetails(Convert.ToInt32(reportSummary["ReportSummaryId"]), startRowIndex, maxRows);
            RadGrid1.DataSource = reportDetails;
        }

        protected void RadAjaxPanel_Init(object sender, EventArgs e)
        {
            //SET THE TOTAL # OF ROWS IN THE OVERALL REPORT
            string userKey = Common.GetUserKeyFromCookie(Request);
            DataTable reportSummaryTable = DataAccess.GetReportSummary(userKey, "SelectFollows");
            reportSummary = reportSummaryTable.Rows[0];
            int recordCount = Convert.ToInt32(reportSummary["RecordCount"]);
            RadGrid1.MasterTableView.VirtualItemCount = recordCount;
            RadGrid1.VirtualItemCount = recordCount;
        }



The code from my ASPX is:

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" OnInit="RadAjaxPanel_Init" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" PageSize="100" OnNeedDataSource="RadGrid1_NeedDataSource" runat="server">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView AllowCustomPaging="true" AllowPaging="true" TableLayout="Fixed">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="ScreenName" HeaderText="ScreenName" HeaderStyle-Width="250px" DataField="ScreenName"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="ProfileImage" HeaderText="Photo" HeaderStyle-Width="250px" DataField="ProfileImage"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings ReorderColumnsOnClient="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder">
                <Virtualization EnableVirtualization="true" InitiallyCachedItemsCount="100"
                    LoadingPanelID="RadAjaxLoadingPanel1" ItemsPerView="100" />
                <Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" UseStaticHeaders="true" ScrollHeight="500px" />
                <Resizing AllowColumnResize="true" />
            </ClientSettings>
            <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        </telerik:RadGrid>

    </telerik:RadAjaxPanel>

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 31 Jan 2014, 11:33 AM
Hello Dan,

Thank you for contacting us.

RadGrid Virtualization functionality is not implemented to works with custom paging, therefore you can not get them work fine together. However, I discussed this scenario with our developers and they said that we can improve the Virtualization in order to make it work when custom paging is enabled. We have also logged this request in our ideas and feedback portal.

We are sorry for the inconvenience this might cause you.

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Chandini
Top achievements
Rank 1
answered on 15 Nov 2019, 12:39 AM

Hello Dan,

I'm checking to see if the custom paging works with the virtualization now? Please update

 

Thanks

0
Eyup
Telerik team
answered on 19 Nov 2019, 06:50 AM

Hello Chandini,

 

There is now a solution to demonstrate how you can achieve this requirement. You can find the Knowledge Base link provided here:
https://feedback.telerik.com/aspnet-ajax/1375407-add-radgrid-virtualization-custompaging-support

I hope this will prove helpful.

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Chandini
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or