Link to home
Start Free TrialLog in
Avatar of lnshop
lnshop

asked on

Asp.net 2.0 Treeview Control-How to use expand collapse without images

I have a treeview control with one root, 2 parents and several nodes.  The expand collapse is working fine for the menu structure but can I use the control without the +- image or use an empty image?? The html code is below.   Any help would be appreciated, thank-you very much.
<asp:TreeView ID="TreeView2" runat="server" DataSourceID="XmlDataSource3" style="font-size: 10pt; font-family: Arial; position: absolute; left: 455px; top: 118px; width: 280px" NodeIndent="0" Height="81px" Width="197px" EnableViewState="False" MaxDataBindDepth="2" ExpandDepth="2" >
            <DataBindings>
                <asp:TreeNodeBinding DataMember="UWDocs" TextField="text" SelectAction="None"/>
                <asp:TreeNodeBinding DataMember="CertificateOfFacReHeading" TextField="text" ValueField="text" selectAction="Expand"/>
                <asp:TreeNodeBinding DataMember="CertificateofFacReDocList" NavigateUrlField="url"
                    TextField="text" ValueField="text" ImageUrlField="#Value" />
                <asp:TreeNodeBinding DataMember="LapsedCancelledBusMemoHeading" TextField="text"
                    ValueField="text"  SelectAction="Expand"/>
                <asp:TreeNodeBinding DataMember="LapsedCancelledBusinessMemoDocList" NavigateUrlField="url"
                    TextField="text" ValueField="text" />
 </DataBindings>
            <ParentNodeStyle Font-Names="Arial" Font-Size="10pt" Width="280px" />
            <SelectedNodeStyle Font-Names="Arial" Font-Size="10pt" />
            <RootNodeStyle Font-Names="Arial" Font-Size="10pt" ForeColor="Black" cssClass="GeneralRoot"  BackColor="Transparent" Width="300px"/>
            <NodeStyle Font-Names="Arial" Font-Size="10pt"  VerticalPadding="2px" Width="280px" HorizontalPadding="1px" ForeColor="SlateBlue" CssClass="mynode"/>
            <LeafNodeStyle Font-Names="Arial" Font-Size="10pt" /> 
            <HoverNodeStyle BackColor="#EAEAF5"  />
        </asp:TreeView>
        <asp:XmlDataSource ID="XmlDataSource3" runat="server" DataFile="~/Canadian/CanadianXMLTesting/CanadianHomePageUWDocumentsMLFile.xml">
        </asp:XmlDataSource>
       </div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of scrathcyboy
scrathcyboy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lnshop
lnshop

ASKER

Does you solution apply to windows.forms or web forms?  For webforms, I think only way to do this is to either find another image or script the functionality of the treeview.  I will keep looking for an resolution and thank you very much for your help with this.
good question -- I think that applies to the web forms more than the windows forms, want me to check further?
Avatar of lnshop

ASKER

No, but thank you.  I think I will try to find another image.  The xml and treeview navigation works so well without a single line of coding, I want to use it and workaround the image problem.