Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Hierarchical UltraWebGrid not updating child rows when paging
posted

I have a hierarchical UltraWebGrid that has 1 child band and allows paging.  Everything works fine other than when paging through the data the child records shown are never updated to reflect the new parent.  (ie. if my page size is 10 the child records for parent 2 also show for parent 12, 22, etc.)

I saw a previous posting on here but that has not solved my problem.  I have tried setting the datakey field both in aspx file and the codebehind.  This grid is sitting inside an Ajax update panel.  Here is what I have:

<igtbl:UltraWebGrid ID="uwgRequests" runat="server" OnClickCellButton="uwgRequests_ClickCellButton" OnDeleteRow="uwgRequests_DeleteRow" Browser="Xml">
  <Bands>
   <igtbl:UltraGridBand AllowSorting="OnClient" Expandable="Yes" GridLines="Both">
    <Columns>
                                <igtbl:UltraGridColumn HeaderText="Req #" Key="ID" IsBound="True" BaseColumnName="ID" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Type" Key="Type" Width="130px" IsBound="True" BaseColumnName="TypeName" />
                                <igtbl:UltraGridColumn HeaderText="Date Created" Key="DateCreated" IsBound="True" BaseColumnName="DateCreated" DataType="DateTime" Format="MMM-dd-yyyy" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Request Date" Key="RequestDate" IsBound="True" BaseColumnName="RequestDate" DataType="DateTime" Format="MMM-dd-yyyy" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Request Description" IsBound="True" BaseColumnName="RequestDescShort" Width="240px" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Status" Key="Status" IsBound="True" BaseColumnName="StatusName" Width="200px" />
                                <igtbl:UltraGridColumn Key="View" Type="Button" NullText="View" CellButtonDisplay="Always" Width="55px" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn Key="Delete" Type="Button" NullText="Delete" CellButtonDisplay="Always" Width="55px" AllowRowFiltering="false" />
    </Columns>
   </igtbl:UltraGridBand>
   <igtbl:UltraGridBand RowSelectors="No" AllowSorting="OnClient" Expandable="No" ChildBandColumn="No">
   <Columns>
                                <igtbl:UltraGridColumn HeaderText="ID" Key="ID" IsBound="True" BaseColumnName="ID" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="First Name" Key="FirstName" IsBound="True" BaseColumnName="FirstName" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Last Name" Key="LastName" IsBound="True" BaseColumnName="LastName" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Employee ID" Key="Employee ID" IsBound="True" BaseColumnName="EmployeeID" AllowRowFiltering="false" />
                                <igtbl:UltraGridColumn HeaderText="Phone" Key="Phone" IsBound="True" BaseColumnName="Phone" AllowRowFiltering="false" />
      </Columns>
    </igtbl:UltraGridBand>
  </Bands>
  <DisplayLayout Name="uwgRequests" RowHeightDefault="20px" SelectTypeRowDefault="Single"  ViewType="Hierarchical" RowSelectorsDefault="No" CellClickActionDefault="RowSelect" LoadOnDemand="Xml" GridLinesDefault="None" XmlLoadOnDemandType="Synchronous">

   <Pager AllowPaging="true" PageSize="8" Alignment="Center" PagerAppearance="Bottom"                          PrevText="Prev" NextText="Next" StyleMode="PrevNext">
   <PagerStyle CssClass="gridPager" Height="30px" VerticalAlign="Middle" />
  </Pager>
 </DisplayLayout>
</igtbl:UltraWebGrid>

 

        private void uwgRequests_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)
        {
            uwgRequests.DisplayLayout.Bands[0].DataKeyField = "ID";
            uwgRequests.DisplayLayout.Bands[1].DataKeyField = "ID";

}

My datasource is a generic List<>.  Both keys are "ID" properties of their respective objects?  Is that the issue?