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

Forums / Bugs & Issues / Error with CategoriesSelector

Error with CategoriesSelector

4 posts, 0 answered
  1. Paul
    Paul avatar
    176 posts
    Registered:
    18 Nov 2008
    13 Apr 2009
    Link to this post

    Hi!

    I'm getting this error when I'm trying to filter my generic content by categories:

    A required control was not found in the template for "~/Sitefinity/Admin/ControlTemplates/Generic_Content/CategoriesSelector.ascx". The control must be assignable form type "System.Web.UI.WebControls.GridView" and must have ID "categoriesList".

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: Telerik.Cms.Web.UI.TemplateException: A required control was not found in the template for "~/Sitefinity/Admin/ControlTemplates/Generic_Content/CategoriesSelector.ascx". The control must be assignable form type "System.Web.UI.WebControls.GridView" and must have ID "categoriesList".

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Apr 2009
    Link to this post
    Hi Paul,

    Generally the error is thrown due to missing control in CategoriesSelector template. Check whether you have the lines below in your template.

    <%@ Control Language="C#" %> 
    <h4 class="multyhead">Categories selector</h4> 
    <div class="selectedItems"
    <asp:GridView ID="categoriesList" runat="server" AutoGenerateColumns="false" AllowPaging="false" GridLines="None" ShowHeader="false"
        <Columns> 
            <asp:TemplateField> 
                <ItemTemplate> 
                    <asp:CheckBox ID="categorySelectedCheckbox" runat="server" /> 
                </ItemTemplate> 
                <ItemStyle CssClass="gridActionsSelectCategory" /> 
            </asp:TemplateField> 
            <asp:BoundField DataField="CategoryName" SortExpression="CategoryName" HeaderText='<%$Resources:Category %>' /> 
        </Columns> 
    </asp:GridView> 
    </div> 


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Paul
    Paul avatar
    176 posts
    Registered:
    18 Nov 2008
    15 Apr 2009
    Link to this post

    Hi Ivan,

    Your code is the same as in ExternalTemplates which I downloaded. And this code doesn't work as I wrote in first post. Can you give me some suggestions? 

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Apr 2009
    Link to this post
    Hi Paul,

    As I see it, you are trying to use  SelectedCategories from Obsolete members in ContentView control. Please use FilterExpression instead.

    Let us know if there is anything else that we can do for you.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered