1 vote
closed
asp.net ajax autocomplete undefined with numbers

Description

 
I was having a problem with my autocomplete extender filling with "undefined" when numbers rather than letters were involved in the db query return. My web service was retrieving and returning everything just fine but the autocomplete could not handle the numbers even though I tried converting to strings before adding to the array.

THE FIX: instead of converting just wrap the number in single quotes

i.e.
Dim drPart As DataRow
For Each drPart In dsParts.Tables(0).Rows
'the two quotes are added because autocomplete is retarded when handling numbers
lItems.Add("'" & drPart("sItemID") & "'")
Next

Return lItems.ToArray()

This will in turn be automatically stripped out by the control and voila you have the numbers showing up just fine

File Attachments


No files are attached


Closed Oct 17 2007 at 8:44 PM  by kirtid

Comments

most recent at top (show oldest at top)
wrote Oct 17 2007 at 8:44 PM
Dupe of 12901.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987