I have a WHDG with 3 child bands. The final child row does not display when expanding the child's parent row. I've reviewed the code several times and could not find the cause of this behavior. I also verified that all SQL data sources were firing and returning the expected data.
Any help on this issue is greatly appreciated.
<asp:SqlDataSource ID="dsParent" runat="server" ConnectionString="<%$ ConnectionStrings:CHPCOMSDB %>" SelectCommand="dbo.usp_get_Pricing_Request_Parent" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="Begin_Date" Type="String" /> <asp:Parameter Name="End_Date" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="dsChild" runat="server" ConnectionString="<%$ ConnectionStrings:CHPCOMSDB %>" SelectCommand="dbo.usp_get_Pricing_Request_Child" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="Begin_Date" Type="String" /> <asp:Parameter Name="End_Date" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="dsGrandChild" runat="server" ConnectionString="<%$ ConnectionStrings:CHPCOMSDB %>" SelectCommand="dbo.usp_get_Pricing_Request_GrandChild" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="Begin_Date" Type="String" /> <asp:Parameter Name="End_Date" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="dsDetail" runat="server" ConnectionString="<%$ ConnectionStrings:CHPCOMSDB %>" SelectCommand="dbo.usp_get_Pricing_Request_Detail" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="Begin_Date" Type="String" /> <asp:Parameter Name="End_Date" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="dsSummary" runat="server" ConnectionString="<%$ ConnectionStrings:CHPCOMSDB %>" SelectCommand="dbo.usp_get_Pricing_Request_Summary" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="Begin_Date" Type="String" /> <asp:Parameter Name="End_Date" Type="String" /> </SelectParameters> </asp:SqlDataSource> <ig:WebHierarchicalDataSource ID="Grid1DataSource" runat="server"> <DataViews> <ig:DataView ID="dvParent" DataSourceID="dsParent" DataMember="DefaultView" /> <ig:DataView ID="dvChild" DataSourceID="dsChild" DataMember="DefaultView" /> <ig:DataView ID="dvGrandChild" DataSourceID="dsGrandChild" DataMember="DefaultView" /> <ig:DataView ID="dvDetail" DataSourceID="dsDetail" DataMember="DefaultView" /> </DataViews> <DataRelations> <ig:DataRelation ChildColumns="Examiner_Name" ChildDataViewID="dvChild" ParentColumns="Examiner_Name" ParentDataViewID="dvParent" /> <ig:DataRelation ChildColumns="Examiner_Name,Request_Date" ChildDataViewID="dvGrandChild" ParentColumns="Examiner_Name,Request_Date" ParentDataViewID="dvChild" /> <ig:DataRelation ChildColumns="Examiner_Name,Request_Date,Claim_ID" ChildDataViewID="dvDetail" ParentColumns="Examiner_Name,Request_Date,Claim_ID" ParentDataViewID="dvGrandChild" /> </DataRelations> </ig:WebHierarchicalDataSource> <div class="w3-container w3-padding w3-margin w3-white w3-round-large"> <ig:WebTab ID="WebTab1" runat="server" Width="100%" StyleSetName="IG"> <Tabs> <ig:ContentTabItem runat="server" Text="Request Detail"> <Template> <header class="w3-container w3-blue-grey w3-round-large w3-margin w3-center"><b>Details for Period</b></header> <div class="w3-container w3-padding w3-margin"> <asp:UpdatePanel ID="GridPanel1" runat="server"> <ContentTemplate> <ig:WebHierarchicalDataGrid ID="Grid1" runat="server" DataSourceID="Grid1DataSource" AutoGenerateBands="false" AutoGenerateColumns="false" DataKeyFields="Examiner_Name" DataMember="dvParent" Key="dvParent" Width="100%" Height="100%" StyleSetName="IG" InitialDataBindDepth="2" InitialExpandDepth="2"> <Bands> <ig:Band AutoGenerateColumns="false" DataKeyFields="Examiner_Name,Request_Date" DataMember="dvChild" Key="dvChild"> <Bands> <ig:Band AutoGenerateColumns="false" DataKeyFields="Examiner_Name,Request_Date,Claim_ID" DataMember="dvDetail" Key="dvDetail" DefaultColumnWidth="200px"> <Columns> <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Claim_ID" Key="Claim_ID" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Claim_Line" Key="Claim_Line" Header-Text="Claim Line" Width="90px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Line_Item_Status" Key="Line_Item_Status" Header-Text="Status" Width="150px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Service_Code" Key="Service_Code" Header-Text="Svc Code" Width="150px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Rev_Code" Key="Rev_Code" Header-Text="Rev Code" Width="100px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Modifiers" Key="Modifiers" Header-Text="Mod Codes" Width="100px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Amount_Billed" Key="Amount_Billed" Header-Text="Billed Amount" DataFormatString="{0:c}"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Line_Pay_Method" Key="Line_Pay_Method" Header-Text="Line Pricing Method"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Line_Pay_Amount" Key="Line_Pay_Amount" Header-Text="Line Priced Amount" DataFormatString="{0:c}"></ig:BoundDataField> </Columns> </ig:Band> </Bands> <Bands> <ig:Band AutoGenerateColumns="false" DataKeyFields="Examiner_Name,Request_Date,Claim_ID" DataMember="dvGrandChild" Key="dvGrandChild" DefaultColumnWidth="200px"> <Columns> <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Claim_ID" Key="Claim_ID" Header-Text="Claim No."></ig:BoundDataField> <ig:BoundDataField DataFieldName="DOS" Key="DOS" Header-Text="DOS" DataFormatString="{0:d}"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Total_Line_Items" Key="Total_Line_Items" Header-Text="Total Line Items"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Priced_Lines" Key="Priced_Lines" Header-Text="Priced Lines"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Total_Billed" Key="Total_Billed" Header-Text="Total Billed Amount" DataFormatString="{0:c}"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Total_Price_Amount" Key="Total_Price_Amount" Header-Text="Total Priced Amount" DataFormatString="{0:c}"></ig:BoundDataField> </Columns> </ig:Band> </Bands> <Columns> <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name" Hidden="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date" Header-Text="Pricing Request Date" DataFormatString="{0:d}"></ig:BoundDataField> <ig:BoundDataField DataFieldName="Number_Of_Claims" Key="Number_Of_Claims" Header-Text="Claim Count"></ig:BoundDataField> </Columns> </ig:Band> </Bands> <Columns> <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name" Header-Text="Examiner"></ig:BoundDataField> </Columns> </ig:WebHierarchicalDataGrid> </ContentTemplate> </asp:UpdatePanel> </div> </Template> </ig:ContentTabItem>
Hello,
After reviewing the issue you've encountered with the WebHierarchicalDataGrid where scrolling behavior is not functioning as expected for child grids, I believe the problem might stem from the fact that height values are not explicitly set for each band in the grid.
WebHierarchicalDataGrid
When dealing with large datasets, it’s essential to define a fixed height for each band to ensure that scrollbars appear for child grids. Without setting the Height property, the grid may expand indefinitely, leading to a poor user experience.
Height
Here’s an example of how you can set a height for a band:
<ig:Band AutoGenerateColumns="false" DataKeyFields="Examiner_NameRequest_Date" Height="400px"
Please update your configuration to include heights for all bands and test whether this resolves the issue.
If the issue persists, I kindly ask that you send me the SQL script for your database so I can generate the same dataset as yours. This will help me reproduce the issue in my environment and provide a more precise resolution.
Let me know if the suggested solution resolves the issue, or feel free to share the SQL script if further investigation is needed.
Best Regards,Arkan Ahmedov
Infragistics
Thank you for your response, Arkan,
Unfortunately, that did not solve the problem. Below is the SQL script. It seems as though the dvDetial DataView is not binding to the grid band. I was able to verify that dsDetail SqlDataSource is returning data by capturing the e.RowsAffected value from the dsDetail "Selected" event. However, when attempting check if the child grid is binding to the data source, using the grids RowsIslandDataBound event (see below), it never gets to the Detail DataMember.
Private Sub Grid1_RowIslandDataBound(sender As Object, e As RowIslandEventArgs) Handles Grid1.RowIslandDataBound If e.RowIsland.DataMember = "dvDetail" Then Console.Write("Yes") End If End Sub
CREATE TABLE [dbo].[tbl_Pricing_Request_History]( [Examiner_Name] [VARCHAR](200) NOT NULL, [Date_of_Pricing_Request] [DATE] NOT NULL, [Claim_ID] [VARCHAR](50) NOT NULL, [Member_ID] [VARCHAR](50) NOT NULL, [DOS] [DATE] NOT NULL, [Claim_Status] [VARCHAR](30) NOT NULL, [Claim_Line] [SMALLINT] NOT NULL, [Line_Item_Status] [VARCHAR](50) NOT NULL, [Service_Code] [VARCHAR](30) NULL, [Rev_Code] [VARCHAR](10) NULL, [Modifiers] [VARCHAR](100) NULL, [Amount_Billed] [MONEY] NOT NULL, [Copay_Amount] [MONEY] NOT NULL, [Line_Pay_Method] [VARCHAR](150) NOT NULL, [Line_Pay_Amount] [MONEY] NOT NULL ) ON [PRIMARY] GO INSERT INTO dbo.tbl_Pricing_Request_History ( Examiner_Name, Date_of_Pricing_Request, Claim_ID, Member_ID, DOS, Claim_Status, Claim_Line, Line_Item_Status, Service_Code, Rev_Code, Modifiers, Amount_Billed, Copay_Amount, Line_Pay_Method, Line_Pay_Amount ) SELECT 'Mary J. Watson' ,'1/15/2025' ,'1224433411' ,'00000011' ,'11/21/2024' ,'PEND' ,1 ,'OKAY' ,'99931' ,'0455' ,'LT' ,1258.99 ,0.00 ,'Percent Priced: SURGERY OTHER 19.00%' ,200 UNION SELECT 'Mary J. Watson' ,'1/15/2025' ,'1224433411' ,'00000011' ,'11/21/2024' ,'PEND' ,2 ,'OKAY' ,'99221' ,'0383' ,'' ,598.79 ,0.00 ,'Percent Priced: SURGERY 10 25.00%' ,285.63 UNION SELECT 'Mary J. Watson' ,'1/15/2025' ,'1224433411' ,'00000011' ,'11/21/2024' ,'PEND' ,3 ,'WARN' ,'99999' ,'0111' ,'UT' ,12591.00 ,0.00 ,'Implant Billabove Pricing' ,8096.01 GO /*********************************************************************************** The @Begin_Date and @End_Date Parameters are set from WebDatePicker values in page. Values are added on the SQlDataSources Selecting events in VB.Net Code Behind (example below). ---------------------------------------------------------------------------------- Private Sub dsGrandChild_Selecting(sender As Object, e As SqlDataSourceSelectingEventArgs) Handles dsGrandChild.Selecting If dpBeginDate.Value Is Nothing Then strBeginDate = "1/1/" & CStr(Year(Now)) Else strBeginDate = FormatDateTime(dpBeginDate.Value, DateFormat.ShortDate) End If If dpEndDate.Value Is Nothing Then strEndDate = FormatDateTime(Now, DateFormat.ShortDate) Else strEndDate = FormatDateTime(dpEndDate.Value, DateFormat.ShortDate) End If e.Command.Parameters.Item("@Begin_Date").Value = strBeginDate e.Command.Parameters.Item("@End_Date").Value = strEndDate End Sub ***********************************************/ CREATE PROCEDURE dbo.usp_get_Pricing_Request_Parent @Begin_Date DATE = NULL ,@End_Date DATE = NULL AS BEGIN SET NOCOUNT ON; SELECT @Begin_Date = ISNULL(@Begin_Date, '1/1/' + CONVERT(VARCHAR(4), YEAR(CURRENT_TIMESTAMP))) ,@End_Date = ISNULL(@End_Date, CURRENT_TIMESTAMP) SELECT DISTINCT Examiner_Name FROM dbo.tbl_Pricing_Request_History WHERE Date_of_Pricing_Request BETWEEN @Begin_Date AND @End_Date ORDER BY Examiner_Name END GO CREATE PROCEDURE dbo.usp_get_Pricing_Request_Child @Begin_Date DATE = NULL ,@End_Date DATE = NULL AS BEGIN SET NOCOUNT ON; SELECT @Begin_Date = ISNULL(@Begin_Date, '1/1/' + CONVERT(VARCHAR(4), YEAR(CURRENT_TIMESTAMP))) ,@End_Date = ISNULL(@End_Date, CURRENT_TIMESTAMP) SELECT DISTINCT Examiner_Name ,Request_Date = Date_of_Pricing_Request ,Number_Of_Claims = COUNT(DISTINCT Claim_ID) FROM dbo.tbl_Pricing_Request_History WHERE Date_of_Pricing_Request BETWEEN @Begin_Date AND @End_Date GROUP BY Examiner_Name, Date_of_Pricing_Request ORDER BY Examiner_Name, Request_Date END GO CREATE PROCEDURE dbo.usp_get_Pricing_Request_GrandChild @Begin_Date DATE = NULL ,@End_Date DATE = NULL AS BEGIN SET NOCOUNT ON; SELECT @Begin_Date = ISNULL(@Begin_Date, '1/1/' + CONVERT(VARCHAR(4), YEAR(CURRENT_TIMESTAMP))) ,@End_Date = ISNULL(@End_Date, CURRENT_TIMESTAMP SELECT Examiner_Name ,Request_Date = Date_of_Pricing_Request ,Claim_ID ,DOS ,Total_Line_Items = COUNT(Claim_Line) ,Priced_Lines = SUM(CASE WHEN Line_Pay_Method <> 'Non-paying Line' THEN 1 ELSE 0 END) ,Total_Billed = SUM(Amount_Billed) ,Total_Price_Amount = SUM(Line_Pay_Amount) FROM dbo.tbl_Pricing_Request_History WHERE Date_of_Pricing_Request BETWEEN @Begin_Date AND @End_Date GROUP BY Examiner_Name, Date_of_Pricing_Request, Claim_ID, DOS ORDER BY Examiner_Name, Date_of_Pricing_Request, Claim_ID END GO CREATE PROCEDURE dbo.usp_get_Pricing_Request_Detail @Begin_Date DATE = NULL ,@End_Date DATE = NULL ,@Claim_ID VARCHAR(50) = NULL AS BEGIN SET NOCOUNT ON; SELECT @Begin_Date = ISNULL(@Begin_Date, '1/1/' + CONVERT(VARCHAR(4), YEAR(CURRENT_TIMESTAMP))) ,@End_Date = ISNULL(@End_Date, CURRENT_TIMESTAMP) ,@Claim_ID = NULLIF(@Claim_ID, '') SELECT Examiner_Name ,Request_Date = Date_of_Pricing_Request ,Claim_ID ,Claim_Line ,Line_Item_Status ,Service_Code ,Rev_Code ,Modifiers = TRIM(Modifiers) ,Amount_Billed ,Line_Pay_Method ,Line_Pay_Amount FROM dbo.tbl_Pricing_Request_History WHERE Date_of_Pricing_Request BETWEEN @Begin_Date AND @End_Date AND 1 = CASE WHEN @Claim_ID IS NULL THEN 1 WHEN Claim_ID = @Claim_ID THEN 1 ELSE 0 END ORDER BY Examiner_Name, Date_of_Pricing_Request, Claim_ID, Claim_Line
Again, thank you for your response. looking forward to your reply.