Autocomplete search for dropdown in mvc4

Hi,
i am working on mvc4 razor.
I have a dropdown where i am showing all locations.Now i want to implement auto complete search on same dropdown.
My requirement for search is given below:
1) This dropdown should be editable as i can type any text in this dropdown.
2) this dropdown contains locations but i want to perform search on Zip code.
for eq. if i enter zip code 27892 then all locations of that zip code should be display in my dropdown.
Please help to solve this requirement.
Thanks in advance!
Regards
Rajni 

Hello,
You can verify how to do it in this link.
http://smcode.com.br/autoComplete.aspx
Hugs!

Similar Messages

  • I need autocomplete  for search for words in a txt. file

    i am not so good in java.
    I have a running code for search in text with a txt. file (from user bluefox815).
    But I need a solution with autocomplete for search for words in a txt. file.
    test_file.txt (Teil des Inhaltes):
    Roboter robots
    Mechatronik mechatronics
    and so on
    Can you help me please.
    Here is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    * this program searches for a string in a text file and
    * says which line it found the string on
    public class SearchText implements ActionListener {
    private String filename = "test_file.txt";
    private JFrame frame;
    private JTextField searchField;
    private JButton searchButton;
    private JLabel lineLabel;
    private String searchFor;
    private BufferedReader in;
    public SearchText() {
    frame = new JFrame("SearchText");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    searchField = new JTextField(80);
    searchButton = new JButton("Search");
    // this is used later in our actionPerformed method
    searchButton.setActionCommand("search");
    // this sets the action listener for searchButton, which is the current class
    // because this class implements ActionListener
    searchButton.addActionListener(this);
    lineLabel = new JLabel("nach dem Fachbegriff suchen");
    public void createGUI() {
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));
    JPanel bottomPanel = new JPanel();
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
    topPanel.add(searchField);
    topPanel.add(searchButton);
    bottomPanel.add(lineLabel);
    mainPanel.add(topPanel);
    mainPanel.add(bottomPanel);
    frame.getContentPane().add(mainPanel);
    frame.pack();
    frame.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    // now we get the action command and if it is search, then it is the button
    if ("search".equals(e.getActionCommand())) {
    searchFor = searchField.getText();
    searchTheText();
    private void searchTheText() {
    // I initialize the buffered reader here so that every time the user searches
    // then the reader will start at the beginning, instead of where it left off last time
    try {
    in = new BufferedReader(new FileReader(new File(filename)));
    } catch (IOException e) {
    String lineContent = null;
    int currentLine = 0;
    // this will be set to true if the string was found
    boolean foundString = false;
    while (true) {
    currentLine++;
    // get a line of text from the file
    try {
    lineContent = in.readLine();
    } catch (IOException e) {
    break;
    // checks to see if the file ended (in.readLine() returns null if the end is reached)
    if (lineContent == null) {
    break;
    if (lineContent.indexOf(searchFor) == -1) {
    continue;
    } else {
    lineLabel.setText(String.valueOf(lineContent));
    foundString = true;
    break;
    if (!foundString)
    lineLabel.setText("Es kann kein Fachbegriff gefunden werden.");
    try {
    in.close();
    } catch (IOException ioe) {
    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    new SearchText().createGUI();
    }

    Markus1 wrote:
    But I need a solution with autocomplete for search for words in a txt. file.What is your question? What have you tried so far? What are you having difficulty with?
    Mel

  • When i click on 'Show all in Finder' after searching for anything on spotlight, NOTHING happens! No Finder window opens up and the spotlight dropdown menu just shuts! Please help!

    When i click on 'Show all in Finder' after searching for anything on spotlight, NOTHING happens! NO Finder window opens up and the spotlight dropdown menu just shuts! Please help!

    I'm having the same problem in other places as well, for example when i downloaded Easyfind right now, clicking the small magnifying glass button on the right of the file name (shown below) would usually open up finder highlighting the file, but now nothing happens when i click on that button!
    Is there a solution for this, as this was a very useful feature which i used ALL the time?

  • Autocomplete in search box dropdown list fails in new version

    autocomplete in search box dropdown list fails in new version

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    Try to disable hardware acceleration.
    *Edit > Preferences > Advanced > General > Browsing: "Use hardware acceleration when available"

  • Autocomplete in search box dropdown list fails in new version 5

    autocomplete in the search box dropdown fails in new version 5

    I did as you suggested, although after I clicked "manage Search Engines" there was no Show search suggestions to be clicked on that Window. If I then clicked on Search there was an option to select "Suggest searches as type" and "Automatically search when you select from the drop down list".
    Both of these options were already selected so it's still not working.
    This first happened in Firefox 4. it's still has not been resolved.

  • Search for people by selecting keywords from dropdown boxes

    Hi,
    I have a requirement where the user wants to search for people in an organisation using specific values instead of only free text.
    On the search page the user wants to select business unit,location etc from a drop down box and then search for all people in that unit. Is this possible without custom coding?
    Thanks in advance for your help.
    Regards,
    VJ

    Hi VJ,
    As I understand, you would like to add drop-down boxes for sorting search results in SharePoint 2013. I'd suggest you consider customizing refiners in search result page.
    If you would add refiners for people, then you might add refiners to people search result page. Here are the references for detail information for refiners and how to add refiners:
    http://blogs.technet.com/b/tothesharepoint/archive/2013/11/07/plan-to-use-refiners-on-a-search-results-page-in-sharepoint-2013.aspx
    http://blogs.technet.com/b/tothesharepoint/archive/2013/11/11/how-to-add-refiners-to-your-search-results-page-for-sharepoint-2013.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Customize autocomplete filter of DropDown

    Hi there,
    I'm currently working on a more complex autocomplete solution for a dropdown list.
    It's described in several sources that by enabling the "custom text entry" of the dropdown list, open it up on enter and do some filtering on exit, you have a simple autocompletion. This filters the items in the list such that only the items starting like the typed text are shown.
    In my case, I have an adressbook in the background and want the autocompletion to search in multiple fields. For example, having "John Doe" in the dropdown list, I want to match the filter not only on "Joh" (first letters of the display value) but also on "Doe" (first letters of the last name).
    For that I created a change event script that takes the typed string and fill the dropdown with the matching items. So far it's working fine.
    But sadly after my filter the build in filter seems to hook in and hides all items that are not starting with the custom text.
    Is there a way to disable this behaviour?
    I have tried several other solutions like put a text field in the foreground of the dropdown box and use this for text entry, but it moves to the background as soon as I focus on the dropdown, or using a text field and a floating list that is shown when needed but no scrollbars are shown unless you focus the list and then you can't type anymore, and so on.
    I would be glad if you can help me or tell me an idea that could work!
    Regards,
    Philipp

    Hello Philipp,
    I am also trying to work thru the same thing. Possibly we can get there together ...
    I am familiar with the "custom text entry" method, but that alone doesn' suffice.
    I am trying to tackle it without creating any extra text fields, etc, ... just use the drop-down list field itself.
    Right now I am reading in detail http://forums.adobe.com/message/2372156#2372156
    Seems like this is trying to tackle the same functionality you are looking for.
    I'll keep you posted if I find anything.
    Regards, Martin

  • Autocomplete search not working in a visual webpart

    I have a webservice that gives me some data from a sharePoint list.
    I am trying to use that webservice for an autosuggest textbox in a application using jquery.
    i can browse the webservice and invoke the operations directly.
    But i am getting error in the jquery all the time saying 500 internal server error.
    i can browse the web service without any issue if i go to the url.
    here is my code
    **jQUERY**
    $(document).ready(function () {
    $('#<%=txt_search.ClientID%>').autocomplete({
    source: function (request, response) {
    $.ajax({
    url: "/_layouts/service/getdata.asmx/Returndata",
    data: request.term,
    dataType: "json",
    type: "POST",
    contentType: "application/json; charset=utf-8",
    error: function (XMLHttpRequest, textStatus, errorThrown) {
    alert(textStatus);
    minLength:2
    **here is my webservice method code which returns array of strings**
    public string [] Returndata()
    List<String> _data = new List<string>();
    String title = string.Empty;
    String keycontent = string.Empty;
    SPList list = SPContext.Current.Web.Lists.TryGetList("Data");
    foreach (SPListItem _item in list.Items)
    title = (string)_item["Title"];
    _data.Add(title);
    return _data.ToArray();
    if i browse to the method directly like this i can see the array of strings
    http://sharepointsite/_layouts/service/getdata.asmx/Returndata like below
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
    <string>Child Care Assistance</string>
    <string>TANF</string>
    <string>Child Care Subsidies</string>
    <string>Child Care Settings</string>
    <string>Regulation Status</string>
    <string>Family Copayments</string>
    <string>Reasons For Care</string>
    <string>Child Care Development Fund</string>
    <string>ACF-801 Child Care Monthly Case Record Form</string>
    <string>Air Pollutants</string>
    <string>Clean Air Act</string>
    I am struggling why i am having an error any help
    kukdai

    Hi,
    If you only want to get data from list and achieve the
    Autocomplete search function in SharePoint 2013, we can use SharePoint REST API and jQuery to achieve it.
    Here are two blog for your reference:
    Working with SharePoint list data - OData, REST and JavaScript
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Using jQuery UI autocomplete with the REST API to get search results in the search box
    http://blogs.msdn.com/b/murads/archive/2013/02/20/using-jquery-ui-autocomplete-with-the-rest-api-to-get-search-results-in-the-search-box.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Can I search for pdf and word documents at the same time in finder?

    I often want to search for more than one file type at a time - for instance pdfs and word docs in a directory, or Jpgs, GIFs, PNGs etc.
    Can I do this in the finder in one go (so I can save it as a folder I can then select when I want to)?
    I tried typing OR between the 'tokens' it creates, but then it just searches for OR - so not as intelligent as one would think?!
    Surely there must be a way to do something as simple as this?
    regards
    Rob

    Forget the whole "tokens" business (I think that is a pretty useless "improvement" to constructing Spotlight searches). Hit command-F to bring up the search window, and set your first criteria, in the example I changed it from the default Kind to Created Date, to keep the number of results manageable. Now hold down the Option key and click on the "+" at the end of the criteria line, it will change to "..." and you get a new criteria line. From the dropdown menu choose "Any" if necessary (this will give you the Boolean OR), then enter what you want in the first sub-head. To get a second sub-head OR criteria click the "+" at the end of the Any line.
    I don't generate many MS Word docs, so I just stopped in the example above after typing Microsoft, since that brought up all the MS anything I have from this year (a couple of Power Point thingies sent to me by friends).
    Francine

  • How can i search for a color that is not in the color palette? (CS 5.5)

    I have a client, that has used a certain color in a series of textfields throughout the document.
    The color consists of all 4 CMYK colors and needs to be just Keycolor. However the color is not in the swatches menu, so marking it there and changing it won't work. I have downloaded a script that might have worked, but it could only find colors that were in the swatches palette. (Find / Change by Color / Overprint" version 1.2).
    Ofcourse, creating a similar color and adding it to the swatches doesn't work.
    Is there anyway that i can search for the color or does it really have to be done manually.
    Best regards

    You can only search for real, actually existing swatches. No sweat: use "Add Unnamed Colors" in the Swatch panel dropdown menu to get a list of all of the manually applied colors.
    Since you want to change all of them to the same color, you don't even have to use Search/Replace. Simply delete the new colors and select the one you need in the "Replace With" dialog that appears.

  • Is there a way to Search (List search) for more then one field text from a column for Bulk uploading?

    I've been trying to find more information on this and I apologies if this has already been answered. I just don't know the correct way to ask this. We have a SharePoint List at the company that we have people input information into different columns. The
    problem is most of those information are very repetitive. Is there a way for me to search more then one field text in the column and just input that same information in?
    ex:
    Column 1
    Column 2
    Date:
    883851
    MidWest
    User input 
    8831518
    MidWest
    User input
    On the search field in the SharePoint List, I would need to search for 883851, 8831518 etc,  would view those requested numbers, then I would click edit and change dates to those rows. Does that make sense? I'm sorry I'm fairly new at sharepoint.

    I think what you're asking is about having repetitive options in a list, show up easily for new items being created.
    This can be done by setting the columns that contain repetitive information to Choice fields.  In the configuration of the Choice field, check the box for "Allow custom values".  Now as users are entering data into the list, the dropdown of options
    for a given field grows and users can quickly see and select previously entered and thus repetitive values for the given fields.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • How do I search for a specific word in the code using Dreamweaver?

    I need to search for a specific word in the code for all of my website pages. How can I do that using Dreamweaver?

    To search local files of a Defined Site in DW...
    Open the Find & Replace tool with Ctrl + F
    Change the Find In dropdown to Entire Current Local Site
    Change the Search dropdown to Text or Source code
    Add the text to find in the Find field
    Add the text to replace in the Replace field (or nothing if you just want to delete the text)
    Hit Replace All

  • Unable to search for font style Italic

    In InDesign's Find/Change dialog, I click on the Find Format magnifying glass to open the Find Format Settings dialog. I click on the Basic Character Formats tab, and in the Font Style field I select 'Italic' from the dropdown menu. When I release the mouse button, the field displays 'Regular', not 'Italic'. If I key the word 'Italic' in the field, the same thing happens. The only way I've been able to get around this is to specify the Font Family as well, but I want to search for Italic Font Style regardless of the Font Family (there are several in the document). I haven't specified any other search details in either the Find/Change dialog or the Find Format Settings dialog. I'm currently using CS5.5 but I've experienced this problem dozens of times in both CS4 and CS5.5. I have a vague recollection of occasionally being able to do it, but if so it's been very rare.
    Is there a reason why this is happening? Is there any way to search for Italic Font Style regardless of Font Family?

    I'm on Mac OS 10.6.8.
    Thanks for the script, it worked fine, but on top of that it inadvertently revealed what is going on with this issue.
    When I ran the script, the Find Format field in the Find/Change dialog showed '+Italic'. However, when I went into the Find Format Settings dialog, the Font Style field said 'Regular'. When I exited the Find Format Settings dialog, the Find Format field still said '+Italic'. The Find process worked fine, that is, it found text formatted as Italic.
    I then went back to what I was originally doing, without using the script, and exactly the same thing happened. The two fields didn't match up, but the Find operation worked fine.
    I'm currently working in CS5.5, but as I recently purchased CS6, I tried it in that program and exactly the same thing happened. And just to confirm my recollection, I tried it in CS4 and it happened there too.
    I realise also why it has occasionally worked OK. Sometimes I would have entered Italic in the Font Style field and immediately clicked OK to exit the Find Format Settings dialog, and I wouldn't have noticed anything wrong. But once I got used to the problem, I started to make a habit of tabbing out of the Font Style field 'just to make sure'. I would have seen it revert to Regular, and I would have just given up and (unnecessarily) worked my way through the font families one by one.
    Anyway, now that I know what's going on, it's not a problem at all, but it's odd that it's persisted through at least three versions of InDesign. Thanks, Jongware, for your help.
    Does this happen on Windows? Has anyone else on a Mac experienced this strange behaviour?

  • How to search for (and get taken to) a specific SMS or iMessage?

    Hi all,
    I can't find a way to jump to a Specific part of a conversation position in the Messages app.
    My phone has a few long conversations stored (often requiring 100 or more taps of the "load more messages" button to scroll all the way through) rather than a lot of short ones. And searching a specific keyword (say, from an SMS or iMessage i remember receiving a couple of weeks ago) in Spotlight or the Messages app search box returns specific results, so the phone is capable of locating a specific position in the conversation but I can't find a way to jump to it, if the queried text is behind the first "load more messages" wall - in these cases when I tap the search result, I'm taken to the end of the conversation, rather than the part of the conversation I searched for.. It basically teases you, telling you "yes, I can locate the text you want, but no, I won't take you to it" ;)
    Am I missing something or are there external apps that can do it?
    Thanks,
    Chris

    In the Finder press COMMAND-F to open a Spotlight search window. From the Kind dropdown menu select Other. When the attributes list appears scroll down to File Extension and check the box on the right. Click on the OK button. You should now see File Extension in the dropdown menu of the search window. Use this to search for files with the given extension.
    You can also just do a simple search for an extension.

  • Search For business transactions

    Hi All
    Please help on this
    when we  do crmd_order and go to the search for business transaction screen there is a find tab in which we get all transaction types- I want to hide some of the transaction types from there
    Gor eg- the transaction types are - Opportunity, Service, Service contract, Leads, Framework agreement, tasks, business activities- I want to hide some of them
    How can I do this?
    I hope  you have understood my question?
    Regards
    Tarang
    Message was edited by:
            Tarang Goel

    Hi Goel,
    I believe that the answer of Arun is related to not having certain transaction types in crmd_order, for example, creation, display. Which means that this kind of transaction will not be used at all in the system.
    But as far as I could understand, your requirement is only ignore some transaction categories show in the Find dropdown in the Find tab, isn't it? Please correct me if this is not the case.
    If my understanding is correct, you might use authorization check to realize this:
    in Function module CRM_ORDER_CHECK_AUTH_BUS_OBJCT
    if you make a full text search for 'AUTHORITY-CHECK'
    you will see a list of objects checked here.
    And if for example you would like to hide Lead, then please do not assign authorization of object CRM_LEAD with activity 45 to this user id.
    Then the authorization failed, then the Lead option will not be in the drop down.
    please also check whether these objects are checked in other processes to avoid any side effects.
    Hope this could do help!
    Hongyan
    Message was edited by:
            Hongyan Shao

Maybe you are looking for