More in this section

Forums / Bugs & Issues / custom search results sample issue

custom search results sample issue

2 posts, 0 answered
  1. Adam
    Adam avatar
    1 posts
    19 Nov 2014
    14 Apr 2015
    Link to this post


     I am modifying the custom search results sample found here:

    I am unable to compile it for a few reasons, both of which I suspect might be related. One is the following error message related to this using statement (using Telerik.Sitefinity.Services.Search.Model;):

    Error 2 The type or namespace name 'Model' does not exist in the namespace 'Telerik.Sitefinity.Services.Search' (are you missing an assembly reference?) C:\Projects\Work\SiteFinityUpgradeTest73b\SiteFinityUpgradeTest73b\FGLife.Public.Web\CustomControl\fglSearchResultsEmployeeDirectory.ascx.cs 10 42 FGLife.Public.Web

     The other issue is presented by the following line

    this.resultsList.ItemDataBound += ResultsListItemDataBound;


    I cannot seem to find out what model the first error is referring to and what the correct namespace is, and for the second error the line refers to a this.resultsList and i have no idea what this represents or what I am supposed to have inherited from if anything. Maybe this is sillybut could someone point me in the right direction?



  2. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    04 Jan 2016
    17 Apr 2015
    Link to this post

    You can find the full sample for this at the end of this blog post:

    Once you have this on your end, you will be able to utilize the List Data Bound event from the ascx file. For the correct usings,  try the follwing:

    using System;
    using System.Linq;
    using System.Web.UI.WebControls;
    using Telerik.Sitefinity.Ecommerce.Catalog.Model;
    using Telerik.Sitefinity.Libraries.Model;
    using Telerik.Sitefinity.Modules.Ecommerce.Catalog;
    using Telerik.Sitefinity.Modules.Libraries;
    using Telerik.Sitefinity.Modules.Pages;
    using Telerik.Sitefinity.Pages.Model;
    using Telerik.Sitefinity.Services.Search.Data;
    using Telerik.Sitefinity.Utilities.TypeConverters;

    Atanas Valchev
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered