ASP.NET TreeView nodes not expanding and collapsing - asp.net

I have a TreeView menu populated from a SiteMapDataSource. The TreeView defaults to all nodes expanded, but the normal client side expand/collapse behaviour for the nodes is not working. I get one Javascript error in my Firebug console, being:
TreeView_ToggleNode is not defined
What could be causing this?

The TreeView menu is on a page that displayed content pages in an IFrame. The TreeView is bound to a SiteMapDataSource, and for convenience, the developer added a <base> tag to the page, declaring the target of all links on the page to be the IFrame. The TreeView uses javascript links for it's navigation buttons and setting a base target breaks these all.
I solved the problem by selectively setting only the actualy menu links, not the expand and collapse buttons, to have a target of the IFrame, with the following jQuery:
$("#navigation a[class^=menu]").attr("target", "iframe1");

Related

Layout items on QToolBox page to expand with page

In Qt Designer, how do you lay out the items on the pages of a QToolBox so that they expand with the toolbox? I have tried adding a table-view widget on a QToolBox page. Please see image:
But when the QToolBox is expanded along with my application main window, the table-view does not expand with the toolbox page.
Is there something I am missing ?
To answer my own question, first I had to have a layout on the desired page of the toolbox.
Then I had to highlight the toolbox itself in the object inspector pane (while the page I want to layout on is active AND has a layout object !!).
Then I chose the desired layout from the toolbox context menu (i.e. right mouse click on the toolbox object and choose Layout). This changed the layout on the active page. Not sure why this worked but it worked.
Thanks #ekhumoro for pointing me in the right direction.
You need to click on the toolbox page to select it, and then set a layout on the page itself. Each page in the toolbox will need its own layout set in this way.
If you look in the Object Inspector, you will see that each page has a QWidget automatically added to it. The layout for each toolbox page is actually set on that container widget, which then holds whatever other widgets you add to the page. Once the layout has been set properly, you should see the icon in the Object Inspector change to the appropriate layout icon.

how to assign menu control to sub-node of sitemap on masterpage

i am using menu controls on my master-page and have used sitemap data-source to populate it. It shows main node on menu. is there a way that it populates the menu with sub-nodes of my master node rather than using default "home" ie masternode as starting menu item.
when you create a site map, you always design your properties in a way that it suites your web needs, They will contain, your starting node, name display, view state and autopostback.
Check your sipemapdatasource properties and your will know how to do that
You just simply put the ShowStartingNode = False in the SiteMapDataSource properties.
IT was simpler than i thoght.

ASP.NET Treeview control default behavior

I have a page using a Treeview server control like so:
<asp:TreeView ID="uxTreeView" ShowExpandCollapse="True" ShowCheckBoxes="All" runat="server"></asp:TreeView>
What I expect to have happen is my treeview should render a series of checkboxes, with the first level having a plus sign (+) to expand it, and then a minus sign (-) when it's expanded to collapse it.
For some reason, I'm not seeing the expand/collapse links. I can see there's a parent and a child node, and they're properly nested, but the expand/collapse links aren't showing.
Has anyone seen this before? In the past this hasn't been an issue - dragging and dropping the control onto a page has worked fine. I've inspected the elements with Firebug, and I didn't see any CSS that would hide the expand/collapse links.
UPDATE
I've found there's an ImageSet property on the treeview - now my treeview is actually adding the arrows for the various nodes indicating whether they're expanded or collapsed. Is it possible to style the individual cells in the outputted table? (It looks like this would be a lot of work)
Did you by chance specify custom images, perhaps incorrectly, for the expand and collapse elements?

Hide Non-Displayed ASP Elements in Design View

Is there a way to prevent non-displayed elements from appearing in the ASPX Design View editor?
By "non-displayed elements", I mean the background elements (Managers, DataSources, Validators, etc) that show up as grey boxes containing the type and id.
If I have several of those at the top of the page, I can't see much of the preview of my page.
Nevermind, I found it!
Click inside the editor (the Design pane).
View (menu) -> Visual Aids (submenu) -> ASP.NET Non-visual Controls

Asp.net ajax combobox doesn't display correctly when inserted inside a tab control

I have a display problem when I try to use a ajax combobox inside a tab control:
when my tab control loads on the page where the combobox is, everything works fine; however, if it loads on a another page, the you change to the page which contains the combobox, the right button (which opens the list of the combobox) isn't displayed at all.
Has someone been through this behavior? And maybe found a solution ?
Thanks in advance !
Use Firebug in FireFox (this tool is very good if you dont use it) and right-click the area where your drop arrow should be, then select "Inspect Element". At the bottom of your browser screen, you will see a couple windows. One window will detail teh styles being applied to the arrow area.
Look for a style that is making visibility of either a <td> or <img> to be hidden. The Ajax ComboBox control, sadly, is laid out in a table.

Resources