How to limit Items treeview to one deep?

Last post 10-13-2009 6:05 AM by Hyacinth Broadchest. 1 replies.

Sort Posts:

  • How to limit Items treeview to one deep?

    06-18-2009, 10:56 AM
    • Member
      119 point Member
    • TGirgenti
    • Member since 03-01-2006, 10:32 PM
    • Posts 131

    Hello.

    Using the Small Business Starter Kit Website, i can't figure out how to limit how deep the links can be activated in the treeview menu.  I'd like to explain that.

    When you look at the items screen, the treeview on the left under All Items, you see Amet, Consectetuer, Adipiscing, Pharetra Diam and Ullamcorper.  Each of the items can be selected and expanded.  If i click on and expand Amet, it display more links such as Sed eget Magna, Vestibulum, etc. with details in the center pane.  Going further, if i click on one of those links, it will display more detailed items in the center pane.

    I would like to modify the treeview to only go one deep.  For instance, if i click on Amet, i want it to expand to more items in the lsit and show the center pane details, but i dont want to allow any furhter links that can be clicked.  That list would be the end of linking and expanding.

    I removed the child elements from the category c11, c12, c13 etc. but the second tier list shows as a link and if i click it, it simply shows a blank item in the center screen.  This is what i want to stop.

    I want to keep the link feature from being allowed after the first expansion.  I tried studying the items.aspx, items.aspx.vb code and the items.xml file, and could not figure out how to do it.

    Any help would be gratefully appreciated.

    Thanks,
    Tony

  • Re: How to limit Items treeview to one deep?

    10-13-2009, 6:05 AM

    I think what you are saying is, "I don't want three levels of data." 

     

    Rather than, "I do want three levels of data, but only want to display the top two." 

     

    I guess the second option would be silly, as then you coul not display or purchase the bottom level of data, so why have it?

    If you have a read of /App_Data/Items.xml  You will see that there are two levels of Category and one level of Item. 

    The top level of category has a declaration like

    <parentCategoryId>NULL</parentCategoryId>

     

    And the second level has a declaration like

    <ParentCategoryId>c01</parentCategoryId>

    <childItemId>04</childItemId>

    <childItemId>05</childItemId>

    <childItemId>06</childItemId>

    I am figuring if you take out all of the top level categories, and then change all the ParentCategoryId declarations to NULL, you will then have a two-level data structure.

    Regards,

Page 1 of 1 (2 items)