More in this section
Forums / Sitefinity SDK / Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector; How do I override its default verification?

Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector; How do I override its default verification?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. James
    James avatar
    2 posts
    Registered:
    07 Sep 2011
    22 May 2013
    Link to this post
    Currently I have this control:
    <designers:ContentSelector 
                           ID="selector" 
                           runat="server" 
                           TitleText="Choose Items" 
                           BindOnLoad="false"   
                           WorkMode="List"  
                           SearchBoxInnerText="" 
                           SearchBoxTitleText="<%$Resources:Labels, NarrowByTypingTitleOrAuthorOrDate%>" 
                           ListModeClientTemplate="<strong class='sfItemTitle'>{{Title}}</strong>">
    </designers:ContentSelector>

    The problem is that there seems to be a default verification on the item's SearchBox that is preventing me from clearing the filter when the box is empty, there seems to be a baked in verification that requires a minimum 3 characters to apply the filter. Is there a way to override whatever is doing the verification?

    Thank you.
  2. Miroslava
    Miroslava avatar
    57 posts
    Registered:
    16 Jan 2017
    24 May 2013
    Link to this post
    Hello James,

     Thank you for contacting Telerik support team. 

    You have to add the following line of code:

    this.get_itemsSelector().get_itemSelector()._selectorSearchBox.get_searchBox()._minCharacters = 1;

    before this.get_itemsSelector().dataBind()

    This code changes the minimum characters needed to activate the filtering in SearchBox. My example sets it to 1.

    There is a PITS issue regarding clearing of search filter. You can vote for it. Here is a link:
    http://www.telerik.com/support/pits.aspx#/public/sitefinity/15067

    Hope that this is helpful.Regards,
    Miroslava
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

2 posts, 0 answered