Wednesday, March 28, 2012

Extend AutoCompleteExtender behavior

I have written the webservcie to parse the prefixText on semicolom ";" (if present) and return completion list based on the character after the semicolon. That works great, however on the client when a value from the completion list is selected, it overwrites the text box contents.

So for first case I type a charcter 'a' and select ASP from the list, then I add ASP;c to the text box and get a completion list with values {"C#","Code"}. On selecting C# it overwrites the contents in the text box, I want it to be ASP;C#

I want to extend this behavior to append the selection from completion list to the contents of the text box in order to implement gmail type functionality.

Has anyoneout there tried to implement the sutocomplete extender this way.

Thanks in advance.

This is an interesting idea that I had not thought about. It should be possible already using my custom auto complete extender (see signature). I raise an event when an item is selected letting you pass back the string that you want in the textbox. I do this because I use objects instead of just strings returned from my website, so I need to be able to pick the text I want to place in the textbox. So, you could handle this event and append the values and pass the entire value back.


Thank you for a prompt reply.

Its possible to send back the whole string to the completion list. So for first search "a" will yield ASP. Adding ASP;c to the text box will have to get {"ASP;C#","ASP;Code"}

This approach might not help if the text is long (like email address) and won't look as if it is enhancing the user experience either. Is there any other way to achieve this.

Thanks Again


Any other ideas how to achieve this.

Is there a way to add this to the enhancement list with the Atlas team?

Any help is appreciated.

Thanks Again.

No comments:

Post a Comment