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

Forums / Bugs & Issues / Click on any template, Index was out of range

Click on any template, Index was out of range

3 posts, 0 answered
  1. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    03 Oct 2011
    Link to this post
    Having a strange problem. I have 3 templates but any template I attempt to click on (and open) I get '

    Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: indexHaving a strange problem."

    I was hope maybe I can export my templates? Clear somehow Sitefinity? And reimport? Or somehow I need to resolve this error. 

    Any ideas? Questions to help elaborate?

  2. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    03 Oct 2011
    Link to this post
    10/03/2011 10:30:01
    Type : System.ArgumentOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    Source : mscorlib
    Help link : 
    ActualValue : 
    ParamName : index
    Data : System.Collections.ListDictionaryInternal
    TargetSite : System.Object get_Item(Int32)
    Stack Trace :    at System.Collections.ArrayList.get_Item(Int32 index)
       at System.Web.UI.StateManagedCollection.System.Collections.IList.RemoveAt(Int32 index)
       at Telerik.Web.UI.RadMenuItemCollection.Remove(RadMenuItem item)
       at SitefinityWebApp.PfaffMainBase.rSubMenu_ItemDataBound(Object sender, RadMenuEventArgs e) in D:\VSSWorking\randomCustomer.com\App_Data\Sitefinity\WebsiteTemplates\randomCustomer\App_Master\PfaffMainBase.Master.cs:line 114
       at Telerik.Web.UI.ControlDataBinder.BindItem(ControlItemCollection items, Object dataObject, Object dataItem, String dataMember, Int32 depth)
       at Telerik.Web.UI.ControlDataBinder.BindToHierarchicalEnumerable(ControlItemCollection items, IHierarchicalEnumerable enumerable, Int32 depth)
       at Telerik.Web.UI.ControlDataBinder.BindToHierarchicalEnumerable(ControlItemCollection items, IHierarchicalEnumerable enumerable, Int32 depth)
       at Telerik.Web.UI.HierarchicalControlItemContainer.PerformDataBinding(IEnumerable data)
       at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
       at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
       at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
       at Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e)
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    05 Oct 2011
    Link to this post
    Hello Charles,

    It seems that the problem is coming from one of your controls on the templates while trying to bind to a data source.

    If you can bypass the error, you can try and click on Page templates and edit a template. If you cannot even edit it ( I did not fully understand " I attempt to click on (and open) I get " ) you can open your project through visual studio and start debugging and browse to the templates. This should navigate you to the problematic code.

    Best wishes,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered