Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector; How do I override its default verification? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

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?
  • 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.
  • 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.