solution1368
asked on
auto complete multiple columns
Either using ajax, jquery for the auto complete function for the text box. Instead of shown e.g. 50 US states in one long columns.
How can it be coded with like 5 columns so the drop down list will be shortened.
I have asp.net / c#. Thanks,
How can it be coded with like 5 columns so the drop down list will be shortened.
I have asp.net / c#. Thanks,
Have a look at this example I built for you to see if it's what you need:
http://jsfiddle.net/7Lsy6/1/
Basically I took a sample code from jQueryUI AutoComplete and just added a small CSS change:
Just run the example and let me know.
Cheers!
http://jsfiddle.net/7Lsy6/1/
Basically I took a sample code from jQueryUI AutoComplete and just added a small CSS change:
.ui-menu-item {
width: 33% !important;
float: left;
}
Just run the example and let me know.
Cheers!
Just a comment on the last post - you might want to prefix the css change with a class or ID to keep the change local to the text box.
There might not be a side effect in this case but if you do have other situations where you don't want a multicolumn output then the above change will need to be localised to the text box in question.
There might not be a side effect in this case but if you do have other situations where you don't want a multicolumn output then the above change will need to be localised to the text box in question.
ASKER
Great but I don't want to see comma after it is selected. Is it possible?
And if the data actually come from SQL db. How to do it in asp.net c#?
Thanks
And if the data actually come from SQL db. How to do it in asp.net c#?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
alex: very helpful. I am glad to have your helps.
ASKER
https://www.experts-exchange.com/questions/28256383/ajax-jquery-dropdown-box.html
another question if u have time
another question if u have time
In other words,
Your Div should be styled to show the suggestions in multiple columns like this
Suggestion1 Suggestion4 Suggestion7
Suggestion2 Suggestion5 Suggestion8
Suggestion3 Suggestion6 Suggestion9