Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:18:05+00:00 2026-06-11T17:18:05+00:00

I am trying to achieve a paging with custom databinding in Infragistics WebHierarchicalDataGrid control.

  • 0

I am trying to achieve a paging with custom databinding in Infragistics WebHierarchicalDataGrid control. Desired behavior when user clicks a page link in WHDG pager is to retrieve one page of data from backend (I already have an SQL Server SP that does that) and bind it to WHDG to display 1 page at a time.

I believe using “ContainerGridDataBinding” event is the way to do it but unable to set up a working code. Any help or code examples of how to do it is greatly appreciated.

It would also be great if same behavior persisted on child bands of the WHDG

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:18:06+00:00Added an answer on June 11, 2026 at 5:18 pm

    Once you have your SQL requests/select commands you are going to get a single page you will want to create a custom pager to do this. Then in the events tied to the buttons/dropdown or other control you have in the pager you would call your SQL commands. Please see the following for how to implement the custom pager for the WebDataGrid:

    http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=WebDataGrid_Using_Custom_Paging_Template.html

    Custom pager through code:
    http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=WebDataGrid_Using_Custom_Paging_Template_in_Code.html

    Doing this for the WebHierarchicalDataGrid will be the same for parent band. For children you will want to do it for the behaviors of that band instead of the parent band.

    Now if you don’t want to use buttons and/or dropdowns in your pager and instead want links (1,2,3,4, etc.) this can be done by doing the following in code:

        private class CustomItemTemplate : ITemplate
        {
            #region ITemplate Members
    
            public void InstantiateIn(Control container)
            {
                for (int i = 0; i < 3; i++)
                {
                    LiteralControl link = new LiteralControl();
                    //class for current page: igg_PageCurrent
                    //class for other pages: igg_PageLink
                    link.Text = "<span class='igg_PageLink' idx='" + i.ToString() + "'>" + (i+1).ToString() + "</span>";
    
                    container.Controls.Add(link);
                }
            }
    
            #endregion
        }
    
        protected void Page_PreInit(object sender, EventArgs e)
        {
            whdg1.Behaviors.Paging.PagerTemplate = new CustomItemTemplate();
        }
    

    The real issue though is when getting data this way from the database where you only get enough data for one page so the grid has no idea how many pages there are in the database. So you will either need to know how to find this or just know it. This also will make the implementing the child band more difficult as you will need to know for each row that can expanded how many child records or pages of records there are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a DataGrid in ASP.NET, and want to achieve custom paging
Trying to achieve the goal of printing selected page's element ONE-TO-ONE - the exact
Im trying to achieve a heading effect link on bbc: http://www.bbc.co.uk/ scroll down to
Im trying to achieve the following: A certain page will have a series of
Im trying to achieve something similar to Apples Contact.app. When the user press Edit
Im trying to achieve a component to make custom shadows to buttons or other
What I'm trying to achieve is to use custom made filters with controls like
I'm trying to achieve the following : when user is trying to access user1.domain.com
What I am trying to achieve is to check all dropdowns on the page
Trying to achieve a background on a page that is "split in two"; two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.