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
20
Webmenu + Drilldown +WebHierarchicalDataSource
posted

I am trying to use the ultrawebmenu with a WebHierarchialDataSource in this case 2 SqlDataSource objects (Parent-Child)  Has anyone attempted this and if so could they provide an example?  The type of Menu I want is the drill down version.

  • 7694
    Suggested Answer
    posted

    Hello,

    You can use the property  DataSourceID="WebHierarchicalDataSource1"  of  web menu to bind to WebHierarchicalDataSource  also you  have to set  the property TextField of ignav:ItemBinding tag and set column that you  will show in menu. For data source I use Northwind DB with employee -> orders tables relation.

     Please take a look at the sample code below:
    <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" JavaScriptFilename="" WebMenuTarget="VerticalMenu"
                WebMenuStyle="DrillDown" JavaScriptFileNameCommon=""
                DataSourceID="WebHierarchicalDataSource1" TargetFrame="" TargetUrl="">
                <IslandStyle BackColor="LightGray" BorderStyle="Outset" BorderWidth="1px" Cursor="Default">
                </IslandStyle>
                <HoverItemStyle BackColor="DarkBlue" Cursor="Default" ForeColor="White">
                </HoverItemStyle>
                <Images>
                    <XPSpacerImage Width="0px" />
                    <SubMenuImage Url="ig_menuTri.gif" />
                </Images>
                <ItemStyle Cursor="Default" />
                <DataBindings>
                    <ignav:ItemBinding DataMember="SqlDataSource1_DefaultView" TextField="City" />
                    <ignav:ItemBinding DataMember="SqlDataSource2_DefaultView"
                        TextField="ShipCity" />
                </DataBindings>
                <DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray">
                </DisabledStyle>
                <Levels>
                    <ignav:Level Index="0"  />
                </Levels>

    Hope this helps.