+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / ToolboxItemCollection...max 3 Items?

ToolboxItemCollection...max 3 Items?

4 posts, 0 answered
  1. Shaun Mitchem
    Shaun Mitchem avatar
    12 posts
    Registered:
    05 Aug 2003
    06 Feb 2007
    Link to this post
    Hello

    We have been developing a few models, and adding them to our toolbox, so controls can be dragged on to pages. In one of our module files we are adding 5 controls, but only 3 ever get displayed in the toolbox. Here's the code:

    public override ToolboxItemCollection Controls

    {

    get

    {

    if (toolboxItems == null)

    {

    //Register the UserList control for public use.

    toolboxItems = new ToolboxItemCollection(new ToolboxItem[] {

    new CmsToolboxItem("~/uc/Frontend/ProfileActivity/ProfileActivityList.ascx", "ProfileActivities", "ProfileActivity List", "Displays and manages ProfileActivities"),

    new CmsToolboxItem("~/uc/Frontend/ProductType/ProductTypeList.ascx", "ProductTypes", "ProductType List", "Displays and manages ProductTypes"),

    new CmsToolboxItem("~/uc/Frontend/OutdoorBrand/OutdoorBrandList.ascx", "OutdoorBrands", "OutdoorBrand List", "Displays and manages OutdoorBrands"),

    new CmsToolboxItem("~/uc/Frontend/User/UserList.ascx", "Users", "User List", "Displays and manages Users"),

    new CmsToolboxItem("~/uc/Frontend/Stockist/StockistList.ascx", "Stockists", "Stockist List", "Displays and manages Stockists")

    //Add additional controls here.

    }

    )

    ;

    }

    return toolboxItems;

    }

    }

    Here is a screen grab of our toolbox:

    http://www.vph.co.uk/public/page.jpg


    Regards,

    Giorgio
  2. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    06 Feb 2007
    Link to this post
    I have a feeling that your issue and mine are related.  I get an error when i add a 4th item to my module, but if i refresh it goes away but my toolbox only has 3 items.

    I started this thread:
    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-gmmek.aspx



  3. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    06 Feb 2007
    Link to this post
    Shaun,

    As a workaround, i've been able to comment out one of the controls that i've already used so that i have only 3 toolbox items again, and add the new control to the page.  Not the ultimate solution, but it at least allowed me to continue building the site and adding new controls to new pages.
  4. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    07 Feb 2007
    Link to this post
    Hello,

    We were able to locate the source of the error. This is a bug in the way the hash code of the toolbox items is calculated. The only workaround for the time being is to keep names and URLs as short as possible. Like this:

    new
    CmsToolboxItem("~/Ctrls/LstCtgrs.ascx", null, "List Categories", null)

    Sorry for the inconvenience. This will be fixed for the next release.


    Regards,
    Rebecca
    the telerik team
Register for webinar
4 posts, 0 answered