DCSIMG
AutoComplete Extender Troubleshooting - YsA.Net

AutoComplete Extender Troubleshooting

Posted Friday, December 28, 2007 4:12 PM by ysa

One of my tasks in our last block was to create a search box for a large value tree. For the implementation we (my team leader Doron and I) decided to use the AutoComplete extender from the Ajax Control Toolkit. While implementing, we ran into a couple of problems :

Problem :

I want the completion list to be right-to-left (for Hebrew input).

Solution :

  1. Set the CompletionListItemCssClass and CompletionListHighlightedItemCssClass.
  2. In both CSS classes insert the following attribute :
  3. text-align:right;
  4. DO NOT set this attribute in the CompletionListCssClass - it will cause the completion list to indent unexpectedly.

 

Problem :

When an error occurs in the completion list web service, there is no indication for it.

Solution :

Our solution was pretty simple : Warp the web service method content with try-catch and log the error. You can use other solutions (like AOP - with attribute on the method), but this is only a partial solution. In all solutions, the client has no idea that an error occurred. The only indication for it is that the completion list does not appear. I hope this will be fixed in the upcoming versions.

Problem :

I want each item to have a key assign to each value.

Solution :

This was not possible in the earlier versions of the toolkit. Today this is possible, be using the the OnClientItemSelected event. For the complete solution, check this out : http://blogs.msdn.com/phaniraj/archive/2007/06/19/how-to-use-a-key-value-pair-in-your-autocompleteextender.aspx

 

That's about it.

 

P.S.

Shani and his team made the usage of the web service for the AutoComplete more generic. I will be very grateful if he will add a couple of word about it (That means that you, Shani,  are tagged - have fun)

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: