Solved

Ajax control toolkit Auto Complete Extender + Suggestion list not displaying words with multiple spaces

Posted on 2016-09-22
5
73 Views
Last Modified: 2016-10-01
Hi Guys,

I am working with Ajax control toolkit autocomplete extender, it is working fine with database call and everything, but i am having problem while displaying the suggestion list to the user.

i have database value as " Word1                        word2", but in the suggestion list it displays "word1 word2".

any help is appreciated.
0
Comment
Question by:Jitendra Patil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41811054
Can you please show us how you've defined the control?
0
 
LVL 13

Author Comment

by:Jitendra Patil
ID: 41811931
Below is the markup code
<asp:TextBox ID="txtTherapyRecommendation" runat="server" width="355px" MaxLength="4000" 
	autocomplete="off" onblur="CheckSelectionfromSuggested(this)" onfocus="SetTherapyContextKey(this);" 		
onkeyup="SetTherapyContextKey(this);"  CssClass="txt_main" oncontextmenu="return false" oncut="return false">
</asp:TextBox>

<ajaxtoolkit:AutoCompleteExtender ID="ACETherapyRecommendation" runat="server" CompletionInterval="500"
	CompletionListCssClass="completionListElement" CompletionListElementID="dvTPTherapy"
	UseContextKey="true" CompletionListHighlightedItemCssClass="highlightedListItem"
	CompletionListItemCssClass="listItem" CompletionSetCount="10" EnableCaching="true"
	MinimumPrefixLength="0" ServiceMethod="SearchRecommendvalues" ServicePath="../charting/WebServGeneral.asmx"
	TargetControlID="txtTherapyRecommendation" OnClientItemSelected="GetReasonID" OnClientPopulated="SetPopulatedData">
</ajaxtoolkit:AutoCompleteExtender>

<asp:HiddenField ID="hdnTherapyRecommendedID" runat="server" />
<asp:Panel ID="dvTPTherapy" runat="server" CssClass="divCustomWidth" 
	Style="position:relative; height: 200px !important; z-index: 10; border-width: medium; display: none; width:360px!important">
</asp:Panel>

Open in new window

below is the css used in the panel
.txt_main
{
	font-family: tahoma;
	font-size: 11px;
	color: #000000;
	text-decoration: none;
	line-height: 14px;
	font-weight: normal;
}
.divCustomWidth
{
	border: 1px solid gray !important;
	margin: 1 px !important;
	height: 350px;
	overflow: auto;
	background-color: white;
}

Open in new window

0
 
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41812638
I was hoping to see some kind of delimiter setting in your control, but that doesn't appear to be the issue.  My only guess is to inspect the CSS in F12 developer tools, or remove all CSS to verify that's not the cause.
0
 
LVL 13

Accepted Solution

by:
Jitendra Patil earned 0 total points
ID: 41815768
hi zephyr_hex thanks for the support,

I have solved the issue, it was the CSS of AutocompleteExtender's  CompletionListItemCssClass  and listItem class that was having White-space: nowrap;  

I changed it to white-space:pre !important; and the issue is solved.
0
 
LVL 13

Author Closing Comment

by:Jitendra Patil
ID: 41824640
I've the found the solution
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question