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
145
WHDG not expanding on the last child band
posted

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>
      
 

Parents
  • 240
    Offline posted

    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.

    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.

    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

Reply Children
  • 240
    Verified Answer
    Offline posted in reply to Customer Infragistics

    Hello,


    After reviewing your issue in detail, I could not determine the exact cause of the problem you are experiencing. However, I have recreated the WebHierarchicalDataGrid (WHDG) and datasource component setup based on the details you provided and ensured that the last row expands correctly in my implementation.

    To assist you further, I am sending:

    1. The appropriate schema and setup for the WHDG: This includes the DataViews, DataRelations, and configuration for the datasource component.
    2. The SQL code: This script will create the required database, tables, and stored procedures to match your data structure.

    Attached Files

    • SQL Script: This includes the database schema, table creation, sample data, and stored procedures.
    • WHDG Configuration: Full details of how the DataViews and DataRelations are defined in the datasource component.

    Next Steps

    1. Implement the provided SQL script in your environment to set up the database.
    2. Use the provided WHDG configuration schema I’ve shared.
    3. Test the implementation on your end and confirm if the issue persists.

    If the problem continues, please share additional details about your setup or any specific error messages you encounter. This will help me further narrow down the issue.

    On my end, the implementation works fine, and the last row expands as expected. I am confident this setup will address the issue, but if not, I am here to assist further.

    Looking forward to your feedback!

    Best Regards,

    Arkan Ahmedov

    Infragistics

    DBStoredProcedures.sql
    -- Create the database
    CREATE DATABASE ClientMatchingPricingRequestDB;
    GO
    
    -- Use the new database
    USE ClientMatchingPricingRequestDB;
    GO
    
    -- Create the main table for Pricing Request History
    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
    );
    GO
    
    -- Insert sample data into tbl_Pricing_Request_History
    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
    )
    VALUES 
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 1, 'OKAY', '99931', '0455', 'LT', 1258.99, 0.00, 'Percent Priced: SURGERY OTHER 19.00%', 200),
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 2, 'OKAY', '99221', '0383', '', 598.79, 0.00, 'Percent Priced: SURGERY 10 25.00%', 285.63),
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 3, 'WARN', '99999', '0111', 'UT', 12591.00, 0.00, 'Implant Billabove Pricing', 8096.01);
    GO
    
    -- Stored procedure for Parent data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_Parent
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return parent data
        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
    
    -- Stored procedure for Child data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_Child
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return child data
        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
    
    -- Stored procedure for GrandChild data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_GrandChild
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return grandchild data
        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, Request_Date, Claim_ID;
    END;
    GO
    
    -- Stored procedure for Detail data
    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;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
        SET @Claim_ID = NULLIF(@Claim_ID, '');
    
        -- Return detail data
        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 (Claim_ID = @Claim_ID OR @Claim_ID IS NULL)
        ORDER BY Examiner_Name, Request_Date, Claim_ID, Claim_Line;
    END;
    GO
    

    Download ASPX File here

    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <ig:WebHierarchicalDataSource ID="Source1" runat="server">
                <DataViews>
                    <ig:DataView ID="ParentDS_DefaultView" DataMember="DefaultView" DataSourceID="ParentDS" />
                    <ig:DataView ID="ChildDs_DefaultView" DataMember="DefaultView" DataSourceID="ChildDs" />
                    <ig:DataView ID="GrandChildDs_DefaultView" DataMember="DefaultView" DataSourceID="GrandChildDs" />
                    <ig:DataView ID="DetailDs_DefaultView" DataMember="DefaultView" DataSourceID="DetailDs" />
                </DataViews>
                <DataRelations>
                    <ig:DataRelation ChildColumns="Examiner_Name" ChildDataViewID="ChildDs_DefaultView" ParentColumns="Examiner_Name" ParentDataViewID="ParentDS_DefaultView" />
                    <ig:DataRelation ChildColumns="Examiner_Name,Request_Date" ChildDataViewID="GrandChildDs_DefaultView" ParentColumns="Examiner_Name,Request_Date" ParentDataViewID="ChildDs_DefaultView" />
                    <ig:DataRelation ChildColumns="Examiner_Name,Request_Date,Claim_ID" ChildDataViewID="DetailDs_DefaultView" ParentColumns="Examiner_Name,Request_Date,Claim_ID" ParentDataViewID="GrandChildDs_DefaultView" />
                </DataRelations>
            </ig:WebHierarchicalDataSource>
    
            <asp:SqlDataSource ID="DetailDs" runat="server" ConnectionString="<%$ ConnectionStrings:ClientMatchingPricingRequestDBConnectionString %>" SelectCommand="usp_get_Pricing_Request_Detail" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-01-01" Name="Begin_Date" SessionField="BeginDate" />
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-12-31" Name="End_Date" SessionField="EndDate" />
                    <asp:SessionParameter DefaultValue="1224433411" Name="Claim_ID" SessionField="Claim_ID" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="GrandChildDs" runat="server" ConnectionString="<%$ ConnectionStrings:ClientMatchingPricingRequestDBConnectionString %>" SelectCommand="usp_get_Pricing_Request_GrandChild" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-01-01" Name="Begin_Date" SessionField="BeginDate" />
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-12-31" Name="End_Date" SessionField="EndDate" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="ChildDs" runat="server" ConnectionString="<%$ ConnectionStrings:ClientMatchingPricingRequestDBConnectionString %>" SelectCommand="usp_get_Pricing_Request_Child" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-01-01" Name="Begin_Date" SessionField="BeginDate" />
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-12-31" Name="End_Date" SessionField="EndDate" />
                </SelectParameters>
            </asp:SqlDataSource>
    
            <asp:SqlDataSource ID="ParentDS" runat="server" ConnectionString="<%$ ConnectionStrings:ClientMatchingPricingRequestDBConnectionString %>" SelectCommand="usp_get_Pricing_Request_Parent" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-01-01" Name="Begin_Date" SessionField="BeginDate" />
                    <asp:SessionParameter DbType="Date" DefaultValue="2025-12-31" Name="End_Date" SessionField="EndDate" />
                </SelectParameters>
            </asp:SqlDataSource>
    
            <ig:WebHierarchicalDataGrid InitialDataBindDepth="2" InitialExpandDepth="2" ID="Grid1" DataSourceID="Source1" runat="server" Height="600px" Width="1000px" AutoGenerateBands="False" AutoGenerateColumns="False" DataKeyFields="Examiner_Name" DataMember="ParentDS_DefaultView" Key="ParentDS_DefaultView">
                <Bands>
                    <ig:Band AutoGenerateColumns="False" DataKeyFields="Examiner_Name,Request_Date" DataMember="ChildDs_DefaultView" Key="ChildDs_DefaultView">
                        <Bands>
                            <ig:Band AutoGenerateColumns="False" DataKeyFields="Examiner_Name,Request_Date,Claim_ID" DataMember="GrandChildDs_DefaultView" Key="GrandChildDs_DefaultView">
                                <Bands>
                                    <ig:Band AutoGenerateColumns="False" DataMember="DetailDs_DefaultView" Key="DetailDs_DefaultView">
                                        <Columns>
                                            <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name">
                                                <Header Text="Examiner_Name">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date">
                                                <Header Text="Request_Date">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Claim_ID" Key="Claim_ID">
                                                <Header Text="Claim_ID">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Claim_Line" Key="Claim_Line">
                                                <Header Text="Claim_Line">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Line_Item_Status" Key="Line_Item_Status">
                                                <Header Text="Line_Item_Status">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Service_Code" Key="Service_Code">
                                                <Header Text="Service_Code">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Rev_Code" Key="Rev_Code">
                                                <Header Text="Rev_Code">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Modifiers" Key="Modifiers">
                                                <Header Text="Modifiers">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Amount_Billed" Key="Amount_Billed">
                                                <Header Text="Amount_Billed">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Line_Pay_Method" Key="Line_Pay_Method">
                                                <Header Text="Line_Pay_Method">
                                                </Header>
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="Line_Pay_Amount" Key="Line_Pay_Amount">
                                                <Header Text="Line_Pay_Amount">
                                                </Header>
                                            </ig:BoundDataField>
                                        </Columns>
                                    </ig:Band>
                                </Bands>
                                <Columns>
                                    <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name">
                                        <Header Text="Examiner_Name">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date">
                                        <Header Text="Request_Date">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Claim_ID" Key="Claim_ID">
                                        <Header Text="Claim_ID">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="DOS" Key="DOS">
                                        <Header Text="DOS">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Total_Line_Items" Key="Total_Line_Items">
                                        <Header Text="Total_Line_Items">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Priced_Lines" Key="Priced_Lines">
                                        <Header Text="Priced_Lines">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Total_Billed" Key="Total_Billed">
                                        <Header Text="Total_Billed">
                                        </Header>
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="Total_Price_Amount" Key="Total_Price_Amount">
                                        <Header Text="Total_Price_Amount">
                                        </Header>
                                    </ig:BoundDataField>
                                </Columns>
                            </ig:Band>
                        </Bands>
                        <Columns>
                            <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name">
                                <Header Text="Examiner_Name">
                                </Header>
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="Request_Date" Key="Request_Date">
                                <Header Text="Request_Date">
                                </Header>
                            </ig:BoundDataField>
                            <ig:BoundDataField DataFieldName="Number_Of_Claims" Key="Number_Of_Claims">
                                <Header Text="Number_Of_Claims">
                                </Header>
                            </ig:BoundDataField>
                        </Columns>
                    </ig:Band>
                </Bands>
                <Columns>
                    <ig:BoundDataField DataFieldName="Examiner_Name" Key="Examiner_Name">
                        <Header Text="Examiner_Name">
                        </Header>
                    </ig:BoundDataField>
                </Columns>
            </ig:WebHierarchicalDataGrid>
        </div>
    </form>

    -- Create the database
    CREATE DATABASE ClientMatchingPricingRequestDB;
    GO
    
    -- Use the new database
    USE ClientMatchingPricingRequestDB;
    GO
    
    -- Create the main table for Pricing Request History
    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
    );
    GO
    
    -- Insert sample data into tbl_Pricing_Request_History
    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
    )
    VALUES 
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 1, 'OKAY', '99931', '0455', 'LT', 1258.99, 0.00, 'Percent Priced: SURGERY OTHER 19.00%', 200),
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 2, 'OKAY', '99221', '0383', '', 598.79, 0.00, 'Percent Priced: SURGERY 10 25.00%', 285.63),
    ('Mary J. Watson', '2025-01-15', '1224433411', '00000011', '2024-11-21', 'PEND', 3, 'WARN', '99999', '0111', 'UT', 12591.00, 0.00, 'Implant Billabove Pricing', 8096.01);
    GO
    
    -- Stored procedure for Parent data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_Parent
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return parent data
        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
    
    -- Stored procedure for Child data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_Child
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return child data
        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
    
    -- Stored procedure for GrandChild data
    CREATE PROCEDURE dbo.usp_get_Pricing_Request_GrandChild
        @Begin_Date DATE = NULL,
        @End_Date DATE = NULL
    AS
    BEGIN
        SET NOCOUNT ON;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
    
        -- Return grandchild data
        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, Request_Date, Claim_ID;
    END;
    GO
    
    -- Stored procedure for Detail data
    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;
    
        -- Handle default parameter values
        SET @Begin_Date = ISNULL(@Begin_Date, '2000-01-01');
        SET @End_Date = ISNULL(@End_Date, GETDATE());
        SET @Claim_ID = NULLIF(@Claim_ID, '');
    
        -- Return detail data
        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 (Claim_ID = @Claim_ID OR @Claim_ID IS NULL)
        ORDER BY Examiner_Name, Request_Date, Claim_ID, Claim_Line;
    END;
    GO