We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Simple Autocomplete Combo

Thread ID:

Created:

Updated:

Platform:

Replies:

102462 Feb 1,2012 01:02 PM UTC Feb 2,2012 08:53 AM UTC ASP.NET MVC (Classic) 1
loading
Tags: Tools
Mark Treveil
Asked On February 1, 2012 01:02 PM UTC

Guys,
I am trying to decide the best way to implement a traditional dropdown list box with auto-complete. The items in the dropdown are determined when the page is displayed and don't change.

To be honest, what I want is essentially what the new tag would have done in HTML 5, but it got dropped.

So far it seems to me that:
1. I can't do auto-complete with your Generic DropDown

2. Can use the Autocomplete Textbox, but this only populates via another HTTP POST. I would like to be able send the data list down with the initial page render to cut out lots of subsequent posts. Is there a way I can to this?

Also, what do the DataFetch option do?

Cheers
Mark



Meena [Syncfusion]
Replied On February 2, 2012 08:53 AM UTC

Hi Mark,

Thanks for using Syncfusion products.

Your requirement of sending the data list of AutoCompleteTextBox with the initial page without Http post could be achieved by enabling the DataSource property of the AutoCompleteTextBox. Please refer the below code snippet,


[Controller]
public ActionResult Index()
{
AutocompleteTextBoxModel myModel = new AutocompleteTextBoxModel();
Northwind context = SqlCE;
var dataSource = from suggestion in context.Customers
select suggestion.CustomerID;
myModel.DataSource = dataSource;
ViewData["myAutocomplete"] = myModel;
return View();
}


The DataSource property is used to fetch the data list without HttpPost.

ClientDataFetch is a feature of AutoComplete which is used to filter the data list from client side without any post.

We have created a simple sample with AutoComplete for your convenience and it can be downloaded from the below link.

AutoCompleteTextBox.zip

Please let us know if you have any other concerns.

Regards,
Meena



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;