Technical support This forum is closed.
Version 1.x > Technical support > CMSTreeMenu - if no items do not show View modes: 
User avatar
Member
Member
JeremyThake - 2/21/2006 7:50:11 AM
   
CMSTreeMenu - if no items do not show
There isn't any exposed properties that we can see that will show how many items are in the CMSTreeMenu. If it is 0 we wish to hide the control.

Is there a way of doing this?

User avatar
Member
Member
forrester - 2/21/2006 3:31:20 PM
   
Re: CMSTreeMenu - if no items do not show
Hi Jeremy,

It sounds like this is what you are looking for in the CMSTreeMenu properties: SelectNodesMaxRelativeLevel="0"

Does this help?

- forrester

User avatar
Guest
admin - 2/21/2006 7:02:56 PM
   
Re: CMSTreeMenu - if no items do not show
Hi Jeremy,

you may need to use some extra code like this:

if (Functions.GetTreeProvider().SelectNodes("/%").Tables[0].Rows.Count == 0)
{
CMSTreeMenu1.Visible = false;
}

The path in the SelectNodes("/%") expression must be same as the path that you set to the CMSTreeMenu1 control.

Please let me know if you need any help with that.

Best Regards,