item not selecting until i hit enter or click on item.

6 posts, 0 answers
  1. Hiren
    Hiren avatar
    2 posts
    Member since:
    Jun 2014

    Posted 13 Jun 2014 Link to this post

    i have use RadAutoCompleteBox control in asp.net. and  everything working fine but i have one problem.

    when i type in autocomplete text both then its show me result in
    dropdown and when i click out side of that dropdown (without select any
    item from result) then first item automatically selected :(.

    i don't need auto selection until i hit enter or click on item.

    How can i do it?

    Thanks,
    Hiren Suthar
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Jun 2014 in reply to Hiren Link to this post

    Hi Hiren,

    RadAutoCompleteBox provides two different visual representations of its entries. The preferable visualization is set via the InputType property of RadAutoCompleteBox which takes one of the following two values: Token and Text. The default behavior of the control in InputType as Text is that it will select the first item automatically when clicking out side. In order to achieve your scenario please try to set the InputType as Token. Please have a look into this online demo for further reference.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hiren
    Hiren avatar
    2 posts
    Member since:
    Jun 2014

    Posted 13 Jun 2014 in reply to Shinu Link to this post

    Hi Shinu,
    thanks for your quick reply.

    Actually, my concern is related with the dropdown open . at that time the first item is by default selected and when i select out side of dropdown/list then first item select. this is my issue.

    i need item will not select until I hit enter or click using mouse.

    please find attache video which issue i have faced. and issue is replicate on demo link which you have provided.
    Note: i have change extension attached file .wmv to .jpg, so rename it .jpg to .wmv for show video.


    Thanks,
    Hiren Suthar



  5. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 13 Jun 2014 Link to this post

    Hi Hiren,

    Yes indeed it is how the control works by default. If you can override this behavior if by adding the code below:
    <script type="text/javascript">
               Telerik.Web.UI.RadAutoCompleteBox.prototype._populateDropDown =function (data, itemsRendered) {
                   var dropDown = this._dropDown,
                       resultCount = data.length;
     
                   if (data.length) {
                       dropDown.populate(data, itemsRendered, dataFields);
     
                       if (renderShowAllButton && resultCount >=this.get_maxResultCount()) {
                           dropDown._addShowAllButton();
                       else {
                           dropDown._removeShowAllButton();
                       }
     
                       if (!this.get_enableClientFiltering()) {
                           dropDown.open(this._getDropDownPositionInfo());
                       }
                   else {
                       this.clear();
                   }
               }
       </script>

    Hope this will be helpful.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Nitesh
    Nitesh avatar
    1 posts
    Member since:
    Nov 2012

    Posted 09 Jun 2015 in reply to Shinu Link to this post

    problem in your online demo. Tab key,click outside of the autocompletetextBox item   add into AutocompletetextBox that is wrong.
  7. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 09 Jun 2015 Link to this post

    Hi,

    This functionality is controlled by the HighlightFirstMatch property- if you set it to false the first item will not be highlighted.

    Hope this will explain the issue. 

    Regards,
    Plamen
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017