+1-888-365-2779
Try Now
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?

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:
    22 Feb 2016
    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