Home / AJAX

AutoComplete Reference

RSS
Modified on 2010/05/04 04:12 by Stephen Walther Categorized as Uncategorized

AutoCompleteExtender Server Reference

Extender that provides suggestions to fill input in a textbox.

AutoCompleteExtender Server Properties

NameDescription
CompletionInterval Time in milliseconds when the timer will kick in to get suggestions using the web service.
CompletionListCssClass Css Class that will be used to style the completion list flyout.
CompletionListElementID ID of element that will serve as the completion list.
CompletionListHighlightedItemCssClass Css Class that will be used to style a highlighted item in the autocomplete list.
CompletionListItemCssClass Css Class that will be used to style an item in the autocomplete list.
CompletionSetCount Number of suggestions to be provided.
ContextKey User/page specific context provided to an optional overload of the web method described by ServiceMethod/ServicePath. If the context key is used, it should have the same signature with an additional parameter named contextKey of type string.
DelimiterCharacters Gets or sets the character(s) used to separate words for autocomplete.
EnableCaching Flag to denote whether client side caching is enabled.
FirstRowSelected Determines if the First Row of the Search Results be selected by default
MinimumPrefixLength Minimum length of text before the webservice provides suggestions.
OnClientHidden Handler to attach to the client-side hidden event
OnClientHiding Handler to attach to the client-side hiding event
OnClientItemOut Handler to attach to the client-side itemOut event
OnClientItemOver Handler to attach to the client-side itemOver event
OnClientItemSelected Handler to attach to the client-side itemSelected event
OnClientPopulated Handler to attach to the client-side populated event
OnClientPopulating Handler to attach to the client-side populating event
OnClientShowing Handler to attach to the client-side showing event
OnClientShown Handler to attach to the client-side shown event
OnHide OnHide animation
OnShow OnShow animation
ServiceMethod The web service method to be called.
ServicePath The path to the web service that the extender will pull the word\sentence completions from. If this is not provided, the service method should be a page method.
ShowOnlyCurrentWordInCompletionListItem If Delimiter characters are specified and ShowOnlyCurrentWordInCompletionListItem is set to true, then the completion list displays suggestions just for the current word, otherwise, it displays the whole string that will show up in the TextBox if that item is selected, which is the current default.
UseContextKey Whether or not the ContextKey property should be used. This will be automatically enabled if the ContextKey property is ever set (on either the client or the server). If the context key is used, it should have the same signature with an additional parameter named contextKey of type string.

AutoCompleteExtender Server Methods

NameDescription
CreateAutoCompleteItem(System.String, System.String) Create a serialized JSON object representing a text/value pair that can be returned by the webservice.
OnPreRender(System.EventArgs) Convert server IDs into ClientIDs for animations

AutoCompleteBehavior Client Reference

This behavior can be attached to a textbox to enable auto-complete/auto-suggest scenarios.

AutoCompleteBehavior Client Properties

NameDescription
completionIntervalAuto completion timer interval in milliseconds.
completionListList dom element.
completionListCssClassCss class name that will be used to style the completion list element.
completionListElementIDID of the completion div element.
completionListItemCssClassCss class name that will be used to style an item in the completion list.
completionSetCountMaximum completion set size.
contextKeyUser/page specific context provided to an optional overload of the web method described by ServiceMethod/ServicePath. If the context key is used, it should have the same signature with an additional parameter named contextKey of type string.
delimiterCharactersGets or sets the character(s) used to seperate words for autocomplete.
enableCachingGet or sets whether suggestions retrieved from the webservice should be cached.
firstRowSelectedFlag to determine if the first option in the flyout is selected or not.
highlightedItemCssClassCss class name that will be used to style a highlighted item in the list.
isMultiWordWhether the behavior is currently in multi-word mode
minimumPrefixLengthMinimum text prefix length required to call the webservice.
onHideGeneric OnHide Animation's JSON definition
onHideBehaviorGeneric OnHide Animation's behavior
onShowGeneric OnShow Animation's JSON definition
onShowBehaviorGeneric OnShow Animation's behavior
serviceMethodWeb service method.
servicePathWeb service url.
showOnlyCurrentWordInCompletionListItemIf Delimiter characters are specified and showOnlyCurrentWordInCompletionListItem is set to true, then the completion list displays suggestions just for the current word, otherwise, it displays the whole string that will show up in the TextBox if that item is selected, which is the current default.
useContextKeyWhether or not the ContextKey property should be used. This will be automatically enabled if the ContextKey property is ever set (on either the client or the server). If the context key is used, it should have the same signature with an additional parameter named contextKey of type string.

AutoCompleteBehavior Client Methods

NameDescription
dispose Disposes the autocomplete behavior
hidePopup Hide the completion list popup
initialize Initializes the autocomplete behavior.
initializeCompletionList Initializes the autocomplete list element
initializeTextBox Initializes the textbox
initializeTimer Initializes the timer
onHide Play the OnHide animation
onShow Play the OnShow animation
raiseHidden Raise the hidden event
raiseHiding Raise the hiding event
raiseItemOut Raise the itemOut event
raiseItemOver Raise the itemOver event
raiseItemSelected Raise the itemSelected event
raisePopulated Raise the populated event
raisePopulating Raise the populating event
raiseShowing Raise the showing event
raiseShown Raise the shown event
showPopup Show the completion list popup

AutoCompleteBehavior Client Events

NameDescription
hidden Add an event handler for the hidden event
hiding Add an event handler for the hiding event
itemOut Add an event handler for the itemOut event
itemOver Add an event handler for the itemOver event
itemSelected Add an event handler for the itemSelected event
populated Add an event handler for the populated event
populating Add an event handler for the populating event
showing Add an event handler for the showing event
shown Add an event handler for the shown event