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 7890581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:23:29+00:00 2026-06-03T06:23:29+00:00

I have an ultrawebgrid with the paging enabled in it. As the data to

  • 0

I have an ultrawebgrid with the paging enabled in it. As the data to be displayed is around 10K rows, pagination is carried out by setting the LoadOnDemand=”XML” property.

The issue I’m facing is when I navigate through the pages, I could see an AJAX call happening but the data displayed is only of the first page.

For ex: I have 10 pages of data, when i click on page ‘3’ the grid displays the content of page ‘1’ itself.

But if I sort or filter any column, sorting and filtering results are as expected.

.aspx:

<DisplayLayout BorderCollapseDefault="Separate" Name="SampleGrid" RowHeightDefault="20px" SelectTypeRowDefault="Single" Version="4.00" AllowColSizingDefault="Free" SelectTypeColDefault="Single" TableLayout="Fixed" AllowAddNewDefault="Yes" AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" AutoGenerateColumns="False" CellClickActionDefault="Edit" ViewType="Hierarchical">.

<Pager><PagerStyle CssClass="igwgPgrBlack2k7" /></Pager>

</DisplayLayout>

.vb:

Protected Sub SampleGrid_InitializeDataSource(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs) Handles SampleGrid.InitializeDataSource

Dim dsData As System.Data.DataSet

Dim sql As String

dsData = DataManager.ExecuteDataset(ConnectionType.XXX, Data.CommandType.Text, sql) // getting dataset


'Me.SampleGrid.DisplayLayout.Pager.PageCount = Math.Ceiling(dsData.Tables(0).Rows.Count/Me.SampleGrid.DisplayLayout.Pager.PageSize) //on first load, i'm getting the PageSize as 8 whereas it has to be 50 rows, I tried setting the page size in 'InitializeLayout' but 'InitializeDataSource' event is called first. So where do i set the grid's PageSize.


SampleGrid.DataSource = dsData
End Sub


Protected Sub SampleGrid_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles SampleGrid.InitializeLayout

Dim htmlString As New StringBuilder

SampleGrid.Browser  = BrowserLevel.Xml

e.Layout.LoadOnDemand   = LoadOnDemand.Xml

e.Layout.RowsRange = 50

e.Layout.XmlLoadOnDemandType = XmlLoadOnDemandType.Accumulative

SampleGrid.DisplayLayout.Pager.StyleMode=PagerStyleMode.QuickPages

SampleGrid.DisplayLayout.EnableInternalRowsManagement=True 

SampleGrid.DisplayLayout.Pager.AllowCustomPaging=True 

SampleGrid.DisplayLayout.Pager.AllowPaging = True

SampleGrid.DisplayLayout.Pager.PageSize = 50

SampleGrid.DisplayLayout.Pager.QuickPages = 5

htmlString.Append("<table cellspacing='0' cellpadding='0' style='width:100%;border:solid 1px Black;'>")

htmlString.Append("<tr>")

htmlString.Append("<td width='25%' align='right'>Viewing page [currentpageindex] of [pagecount] </td>")

htmlString.Append("<td align='center'>")

htmlString.Append("<b>[page:1:First]&nbsp;[prev]</b>")

htmlString.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")

htmlString.Append("[default]")

htmlString.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")

htmlString.Append("<b>[next]&nbsp;[page:[pagecount]:Last]</b>")

htmlString.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")

htmlString.Append("</td>")

htmlString.Append("<td width='25%' align='left' title='Enter page number and press Enter'>")

htmlString.Append("Go to:<input id='PagerGotoPageNumber' size='5' style='vertical-align:text-bottom;height:20px;font-family:verdana;font-size:8pt;padding:0 0 0 0;border:solid 1px black' onkeydown='return gotoPageKeyDown();' type='text' autocomplete='off' />")

htmlString.Append("<button style='height:22px' onclick='gotoPage();'>Go</button>")

htmlString.Append("</td>")

htmlString.Append("</tr>")

htmlString.Append("</table>")

SampleGrid.DisplayLayout.Pager.Pattern=htmlString.ToString()

End Sub


Private Sub SampleGrid_PageIndexChanged(ByVal sender As System.Object, ByVal e As Infragistics.WebUI.UltraWebGrid.PageEventArgs) Handles SampleGrid.PageIndexChanged

        SampleGrid.DisplayLayout.Pager.CurrentPageIndex = e.NewPageIndex

    End Sub
  • 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-03T06:23:31+00:00Added an answer on June 3, 2026 at 6:23 am

    With custom paging it is expected that you will provide the data for the page that you are looking to load. This is necessary because your custom paging may be implemented to have letters rather than page numbers like the example in the Infragistics help.

    If you are looking to do this you would need to make the following changes:

    • The PageIndexChanged event should be removed.
    • The dataset that you are binding to should only have the elements for the specific page. Note that this will also have an impact on sorting and filtering and may prevent them from working unless you return filtered and/or sorted results.

    A simple example that shows paging working with the code that you are using is:

    Protected Sub UltraWebGrid1_InitializeDataSource(sender As Object, e As Infragistics.WebUI.UltraWebGrid.DataSourceEventArgs) Handles UltraWebGrid1.InitializeDataSource        
        Me.UltraWebGrid1.DisplayLayout.Pager.PageCount = 4
    
        Me.UltraWebGrid1.DataSource = Me.GetEmployees(Me.UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex)
    End Sub
    
        Private Function GetEmployees(page As Integer) As DataTable
        Dim dtData As DataTable = New DataTable("Employees")
    
        dtData.Columns.Add("EmployeeID", GetType(Integer))
        dtData.Columns.Add("Name", GetType(String))
        dtData.Columns.Add("OnSite", GetType(Boolean))
        dtData.Columns.Add("DateOfHire", GetType(DateTime))
        dtData.Columns.Add("Department", GetType(Integer))
    
        For i As Integer = (page - 1) * 50 To (page - 1) * 50 + 50 Step 1
            dtData.Rows.Add(New Object() {i, String.Format("Name {0}", i), (i Mod 2 = 0), DateTime.Today, i Mod 8})
        Next
    
        Return dtData
    End Function
    
    'Protected Sub UltraWebGrid1_PageIndexChanged(sender As Object, e As Infragistics.WebUI.UltraWebGrid.PageEventArgs) Handles UltraWebGrid1.PageIndexChanged
    '    Me.UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex = e.NewPageIndex
    'End Sub
    

    Note that you may not need to use custom paging, if you set DisplayLayout.AllowCustomPaging to false then the grid would handle the paging automatically when you click the first,prev, numbers, next and last options in the pager. This would also allow you to keep your data as is and not have to also manually handle sorting and filtering. If you do this you would still remove the PageIndexChanged handler.

    Note that then for the go to button after the input, you would likely need to set the page in JavaScript which can be done with the goToPage client side method of the WebGrid.

    While it isn’t related to the issue that you are having, setting EnableInternalRowsManagement to true has no affect when using InitializeDataSource to set the DataSource of the WebGrid.

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

Sidebar

Related Questions

I am using the Infragistics UltraWebGrid to capture some data. I don't have this
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
have Googled the cr*p out of this one so apologies if the answer is
I need to add a class to the table in a ultrawebgrid I have
Have a xml string, goal is to replace an xml element value to a
Have you any idea how to find out if spell check suggestions dialog is
I'm using the Infragistics UltraWebGrid control and have the following layout: <igtbl:UltraWebGrid ID=uwgPrescribedTrainingPlan runat=server
I have a quite simple data capture web app. In the main capture window,
I have used Infragistics UltraWinGrid to display data on the Grid. In this grid,
Have a string: myString = '<p>Phone Number:</p><p>706-878-8888</p>' Trying to regex out all HTML tags,

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.