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
Filter one WebHierarchicalDataGrid based on selected value of another WebHierarchicalDataGrid
posted

Hi,

I have two tables, Purchase Orders and Purchase Order Lines.   They both appear on the screen at the same time, in separate update panels, one underneath the other.

I would like to capture the value of the field called "POCONumber", in the main POs table, and use it as a filter to filter contents in the PO Lines table.

It would be ideal if I could also write that selected POCONumber value to a session variable.

Solutions can either be in javascript or code-behind; whichever has better performance.

I'm using VB.NET.  

 
 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid3" runat="server" Height="400px" Width="100%" DataSourceID="WebHierarchicalDataSource1" DataKeyFields="ID" EnableAjax="False" EnableAjaxViewState="False" AutoGenerateColumns="False" DefaultColumnWidth="200px">
            <Columns>
                <ig:BoundDataField DataFieldName="ID" Key="ID" Hidden="true">
                    <Header Text="ID">
                    </Header>
                </ig:BoundDataField>
                <ig:BoundDataField DataFieldName="POCONumber" Key="POCONumber">                     <Header Text="POCONumber">                     </Header>                 </ig:BoundDataField>
 
                <%--ETC.--%>
            </Columns>
            <AjaxIndicator Enabled="True" />
 
            <GroupingSettings EnableColumnGrouping="True">
            </GroupingSettings>
            <EditorProviders>
                <%--ETC.--%>
            </EditorProviders>
 
 
            <Behaviors>
                <ig:Activation ActiveCellCssClass="ActiveCellClass" ActiveRowCssClass="ActiveRowClass">
                </ig:Activation>
                <ig:EditingCore BatchUpdating="True" EnableInheritance="True">
                    <Behaviors>
                        <ig:RowEditing>
                            <ColumnSettings>
                                <%--ETC.--%>
                            </ColumnSettings>
                        </ig:RowEditing>
 
 
                        <ig:RowDeleting Enabled="true" ShowDeleteButton="true">
                        </ig:RowDeleting>
                        <ig:RowAdding Enabled="true" EditModeActions-EnableF2="true" EditModeActions-EnableOnActive="true">
                            <EditModeActions EnableOnActive="True" />
                            <ColumnSettings>
                                <%--ETC.--%>
                            </ColumnSettings>
                        </ig:RowAdding>
                    </Behaviors>
                </ig:EditingCore>
                <ig:Selection CellSelectType="Single" Enabled="true" RowSelectType="Single">
                </ig:Selection>
                <ig:RowSelectors>
                </ig:RowSelectors>
                <ig:Paging PageSize="30" PagerAppearance="Bottom" PagerMode="NumericFirstLast">
                </ig:Paging>
                <ig:Filtering>
                </ig:Filtering>
                <ig:Sorting EnableInheritance="true">
                </ig:Sorting>
            </Behaviors>
        </ig:WebHierarchicalDataGrid>
 
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnPOSave" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>
 
<br />
<br />
 
<asp:UpdatePanel runat="server" ID="UpdatePanel3">
    <ContentTemplate>
 
        <ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid4" runat="server" Height="350px" Width="1200px" DataSourceID="whdgsPOLines" DataKeyFields="ID" AutoGenerateColumns="false" EnableAjax="false" EnableAjaxViewState="false">
            <Columns>
                <ig:BoundDataField DataFieldName="ID" Key="ID" Hidden="true">
                    <Header Text="ID">
                    </Header>
                </ig:BoundDataField>
                <ig:BoundDataField DataFieldName="POCONumber" Key="POCONumber" Width="100px">                     <Header Text="PO#">                     </Header>                 </ig:BoundDataField>
                <%--ETC.--%>
            </Columns>
            <AjaxIndicator Enabled="True" />
 
            <EditorProviders>
            </EditorProviders>
 
            <Behaviors>
                <ig:EditingCore EnableChildlessRowsPopulation="True" EnableInheritance="True" BatchUpdating="true">
                    <Behaviors>
                        <ig:RowEditing>
                            <%--ETC.--%>
                        </ig:RowEditing>
                        <ig:RowDeleting>
                        </ig:RowDeleting>
                        <ig:RowAdding Enabled="true">
                            <%--ETC.--%>
                        </ig:RowAdding>
                    </Behaviors>
                </ig:EditingCore>
                <ig:Filtering>                 </ig:Filtering>
 
                <ig:Sorting>
                </ig:Sorting>
            </Behaviors>
        </ig:WebHierarchicalDataGrid>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnSetPONumber" EventName="Click" />
 
    </Triggers>
 
</asp:UpdatePanel>