asp.net - jquery: populating a select list from an autocomplete? -


Basic Issue: Selecting some items from the list of thousands. Possible solutions:

I have an autocomplete field that searches for DB, and returns a name / id pair it is working properly

< P> The next step is to preserve the selected ID, and allow the user to delete something. For this, I'm looking at using a selection, and hoping for a UI as it provides, but it does not work: it allows you to select the items that already The selection is present, but it does not work with a dynamically designed selection.

The last step is a traditional postback (using the submit button, it is in asp.net web forms) where I will need access to the final list of IDs.

What are the other options for this? Depending on your comments below, this cat has several ways of skin, depending on your comments below.

  1. Create an autocomplete text box that fills a list box dynamically while you type.
  2. Clicking on a list box item is dominating two things:
    1. The ID of the selected item is stored in the client-side array
    2. A list item list is sung on the page as well as the selectionlist / sings again. Clicking on the red 'X' will remove the ID from the array and the list will be reproduced. You have to do something about jQuery coding in your favor, but it's not too much.
  3. The above steps are repeated until the user has selected all of their items.

Only clicking on "Save", only the selected items are submitted to the server for processing.


Comments