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
185
WebHierarchicalDataGrid Double Click
posted
I attached a file with my code.
When a user double clicks a row I need to determine if they clicked a parent or child.
I found simular javascript code on the forums; I'm getting error "Object doesn't support property or method 'get_behaviors'" on line "var WHgridBehaviors = WHgrid.get_behaviors();"

Some help please.
Also, if someone could help with my post from Monday.
Thanks, Pat
WHGridCode.txt
    function WHGridMain_DoubleClick() {
            var WHgrid = $find('<%= WHGridMain.ClientID %>');
            var WHgridBehaviors = WHgrid.get_behaviors();
            var WHrow = WHgridBehaviors.get_selection().get_selectedRows().getItem(0);
            var isParent = WHrow.get_grid().get_parentRow() == null;
            if (isParent) {
                alert("go to coll detail");
            }
            else {
                alert("go to plan detail");
            }
        }

             
               <ig:WebHierarchicalDataGrid ID="WHGridMain" runat="server" Height="600px" Width="100%" AutoGenerateColumns="False" ClientEvents-DoubleClick="WHGridMain_DoubleClick" AutoGenerateBands="False" DataMember="Coll" DataKeyFields="CollID">
                    <ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300" />
                    <Columns>
                    <ig:BoundDataField>
			[4 BoundDataFields here...]
                    </ig:BoundDataField>
                </Columns>
                <Bands>
                    <ig:Band DataMember="Pln" Key="Pln" DataKeyFields="CollID" AutoGenerateColumns="false">
                        <Columns>
                            <ig:BoundDataField>
                               [5 BoundDataFields here...]
                            </ig:BoundDataField>
                        </Columns>                  
                    </ig:Band>
                </Bands>
                    <Behaviors>
                        <ig:EditingCore AutoCRUD="False">
                            <Behaviors>
                                <ig:RowDeleting>
                                </ig:RowDeleting>
                            </Behaviors>
                        </ig:EditingCore>
                        <ig:Selection CellClickAction="Row" RowSelectType="Single">
                        </ig:Selection>
                        <ig:RowSelectors>
                        </ig:RowSelectors>
                        <ig:Sorting>
                        </ig:Sorting>
                    </Behaviors>
                </ig:WebHierarchicalDataGrid>