Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector; How

Posted by Community Admin on 05-Aug-2018 23:00

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

All Replies

Posted by Community Admin on 22-May-2013 00:00

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.

Posted by Community Admin on 24-May-2013 00:00

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.

This thread is closed