Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8403741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:25:30+00:00 2026-06-09T22:25:30+00:00

I have an editor with an autocomplete textfield in slickGrid. This looks (simplified) like

  • 0

I have an editor with an autocomplete textfield in slickGrid.
This looks (simplified) like this:

 function AutoCompleteEditor(args) {
 var $input;

 this.init = function () {
   $input = $("<INPUT id='tags' class='editor-text' />");
   $input.appendTo(args.container);  
   $input.bind("keydown.nav", function (e) {
        if (e.which === $.ui.keyCode.LEFT || e.which === $.ui.keyCode.RIGHT) {
          e.stopImmediatePropagation();
        }
        if((e.which === $.ui.keyCode.DOWN) || (e.which === $.ui.keyCode.UP)){ 
          e.stopImmediatePropagation();
        } 
        if(e.which === $.ui.keyCode.RETURN){ 
          e.stopImmediatePropagation();
        }
      })
   $input.focus().select();

   $input.autocomplete({
    minLength: 2,
    autoFocus: true,
    source: function(request, response) {
              .....
           },
        focus: function( event, ui ) {
          return false;
        },
        select: function( event, ui ) {
          event.target.value = ui.item.label;
          return false;
        },
        open: function( event, ui ) { 
          $(this).autocomplete( "widget" )
            .find( "ui-menu-item-alternate" )
              .removeClass( "ui-menu-item-alternate" )
            .end()
            .find( "li.ui-menu-item:odd a" )
              .addClass( "ui-menu-item-alternate" );  
        },
        appendTo: args.container,   
        width: 500,
    });

 };

Now, I have 2 problems:

1) The suggestion list is just a little narrower than the editor field. But I would like it even wider – possibly as wide as the widest item in it

2) I have disabled the up and down arrow keys for the entry field, but it does not focus the list so that the arrows would select the suggestion item.

Any thoughts what is wrong in my code?

Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:25:32+00:00Added an answer on June 9, 2026 at 10:25 pm

    to answer first question.

    you can change the css of autocomplete class

    <style type="text/css">
    .ui-autocomplete {
        max-height: 250px;
        max-width: 200px;
        overflow-y: auto;
        /* prevent horizontal scrollbar */
        overflow-x: hidden;
    
    }
    /* IE 6 doesn't support max-height
     * we use height instead, but this forces the menu to always be this tall
     */
    * html .ui-autocomplete 
    {
        height: 250px;
        width: 200px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have really big problem with calling JSON with jQueryUI autocomplete. I have this
I've been using Editor-Templates in the past like this, by applying the following data
lets'say i have a form, with like this : <form name=frmMail method=POST action=save.do dojoType=dijit.form.Form
I am setting up SlickGrid and need to have a column with an autoComplete
I have an editor template with a dropdown: @Html.DropDownListFor(m => m.AdmissionState, new List<SelectListItem>() {
I have an editor which is in my window that contains a wrapping iframe
I have an editor I am attempting to emulate that has some very nice
i have an editor that is basic microsoft actions: createlink bold etc. i made
I have ace editor integrated in my site. I have some code there, and
I have an editor that built as follows: EditorBuilder builder = context.Html.Telerik().Editor() .Name(ID) .Encode(false)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.