Victor
Victor

Reputation: 555

How can i create dropdown list box working as a Textbox for search data

i have a Drop-downlist in asp.net(c#) web application, in that dropdown i have bind the values from data base.Using this drop-down i have search data by dropdown selected value and then Bind the selected data to the Grid view. My Question is i want search the data by Enter the text in drop-down for searching ,means the dropdown working as a textbox also...is it possible if possible please help me how can i do this.

Upvotes: 0

Views: 1477

Answers (2)

virlan2004
virlan2004

Reputation: 243

Either use the combobox in ajax toolkit ( see http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ComboBox/ComboBox.aspx ) or create a custom control containing a textbox, button and a list and toggle the visibility as necessary (button-click- toggle visibility of the list, typing in the textbox- filter the data in the list and show the list , click inside textbox- could hide the list).

Upvotes: 1

Clayton
Clayton

Reputation: 5350

The ComboBox in the Ajax Control Toolkit provides the behavior you are after.

Upvotes: 2

Related Questions