Highlight filtered results with entered text

3 posts, 1 answers
  1. Sanjay
    Sanjay avatar
    21 posts
    Member since:
    Nov 2010

    Posted 12 Nov 2010 Link to this post

    For some reason I am not able to Highlight filtered results with entered text in the RadComboBox!

    I am able to see all the data and also filter but can't get the

    If I type jo in the box I want to see the record John Smith  with "Jo" bolded and highlighted ?
    Here is my aspx and JS below:

    <

     

    telerik:RadComboBox ID="rcbUser" runat="server" AllowCustomText="false" DropDownWidth="300px"

     

     

    EmptyMessage="Enter a hint or Select Employee" EnableLoadOnDemand="true" EnableTextSelection="false"

     

     

    Height="200px" HighlightTemplatedItems="true" OnItemDataBound="rcbUser_ItemDataBound" Filter="Contains"

     

     

    OnItemsRequested="rcbUser_ItemsRequested" SkinID="ddRegular" ToolTip="Enter a hint or Select Employee"

     

     

    Width="200px" EnableVirtualScrolling="true" OnClientItemsRequesting="OnClientItemsRequesting"

     

     

    ShowMoreResultsBox="true" ItemsPerRequest="15">

     

     

    <HeaderTemplate>

    Client Script:

     

     

    <script type="text/javascript">

     

     

     

     

     

    //on upload button click temporarily disables ajax to perform upload actions

     

     

     

     

     

    function conditionalPostback(sender, args) {

     

     

    if (args.EventTarget == "<%= btnCreate.UniqueID %>") {

     

    args.EnableAjax =

    false;

     

    }

    }

     

    function OnClientItemsRequesting(sender, eventArgs) {

     

     

    var context = eventArgs.get_context();

     

    context[

    "FilterString"] = eventArgs.get_text();

     

     

     

    // if (sender.get_text().length < 2) {

    // eventArgs.set_cancel(true);

    // }

    // //Highlight the matches based on the combobox text

     

     

     

    sender.highlightAllMatches(eventArgs.get_text());

     

    if (sender.get_items().get_count() > 0)

     

    sender.get_items().getItem(0).highlight();

    }

     

     

    </script>

     

     

     

  2. Sanjay
    Sanjay avatar
    21 posts
    Member since:
    Nov 2010

    Posted 15 Nov 2010 Link to this post

    Hello,
    Is anybody there to help?
    It is more than 2 days!!!
  3. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 16 Nov 2010 Link to this post

    Hi Sanjay,

    The filtering functionality, enabled with the Filter property, does not work with ItemTemplate. We will consider implementing in the future though. You can vote for it here.

    Kind regards,
    Simon
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top