📄 autocompletebehavior.js
字号:
/// </param>
/// <returns />
this.get_events().removeHandler('populating', handler);
},
raisePopulating : function(eventArgs) {
/// <summary>
/// Raise the populating event
/// </summary>
/// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false">
/// Event arguments for the populating event
/// </param>
/// <returns />
/// <remarks>
/// The populating event can be used to provide custom data to AutoComplete
/// instead of using a web service. Just cancel the event (using the
/// CancelEventArgs) and pass your own data to the _update method.
/// </remarks>
var handler = this.get_events().getHandler('populating');
if (handler) {
handler(this, eventArgs);
}
},
add_populated : function(handler) {
/// <summary>
/// Add an event handler for the populated event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('populated', handler);
},
remove_populated : function(handler) {
/// <summary>
/// Remove an event handler from the populated event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('populated', handler);
},
raisePopulated : function(eventArgs) {
/// <summary>
/// Raise the populated event
/// </summary>
/// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false">
/// Event arguments for the populated event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('populated');
if (handler) {
handler(this, eventArgs);
}
},
add_showing : function(handler) {
/// <summary>
/// Add an event handler for the showing event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('showing', handler);
},
remove_showing : function(handler) {
/// <summary>
/// Remove an event handler from the showing event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('showing', handler);
},
raiseShowing : function(eventArgs) {
/// <summary>
/// Raise the showing event
/// </summary>
/// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false">
/// Event arguments for the showing event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('showing');
if (handler) {
handler(this, eventArgs);
}
},
add_shown : function(handler) {
/// <summary>
/// Add an event handler for the shown event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('shown', handler);
},
remove_shown : function(handler) {
/// <summary>
/// Remove an event handler from the shown event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('shown', handler);
},
raiseShown : function(eventArgs) {
/// <summary>
/// Raise the shown event
/// </summary>
/// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false">
/// Event arguments for the shown event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('shown');
if (handler) {
handler(this, eventArgs);
}
},
add_hiding : function(handler) {
/// <summary>
/// Add an event handler for the hiding event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('hiding', handler);
},
remove_hiding : function(handler) {
/// <summary>
/// Remove an event handler from the hiding event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('hiding', handler);
},
raiseHiding : function(eventArgs) {
/// <summary>
/// Raise the hiding event
/// </summary>
/// <param name="eventArgs" type="Sys.CancelEventArgs" mayBeNull="false">
/// Event arguments for the hiding event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('hiding');
if (handler) {
handler(this, eventArgs);
}
},
add_hidden : function(handler) {
/// <summary>
/// Add an event handler for the hidden event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('hidden', handler);
},
remove_hidden : function(handler) {
/// <summary>
/// Remove an event handler from the hidden event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('hidden', handler);
},
raiseHidden : function(eventArgs) {
/// <summary>
/// Raise the hidden event
/// </summary>
/// <param name="eventArgs" type="Sys.EventArgs" mayBeNull="false">
/// Event arguments for the hidden event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('hidden');
if (handler) {
handler(this, eventArgs);
}
},
add_itemSelected : function(handler) {
/// <summary>
/// Add an event handler for the itemSelected event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('itemSelected', handler);
},
remove_itemSelected : function(handler) {
/// <summary>
/// Remove an event handler from the itemSelected event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('itemSelected', handler);
},
raiseItemSelected : function(eventArgs) {
/// <summary>
/// Raise the itemSelected event
/// </summary>
/// <param name="eventArgs" type="AjaxControlToolkit.AutoCompleteItemEventArgs" mayBeNull="false">
/// Event arguments for the itemSelected event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('itemSelected');
if (handler) {
handler(this, eventArgs);
}
},
add_itemOver : function(handler) {
/// <summary>
/// Add an event handler for the itemOver event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('itemOver', handler);
},
remove_itemOver : function(handler) {
/// <summary>
/// Remove an event handler from the itemOver event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('itemOver', handler);
},
raiseItemOver : function(eventArgs) {
/// <summary>
/// Raise the itemOver event
/// </summary>
/// <param name="eventArgs" type="AjaxControlToolkit.AutoCompleteItemEventArgs" mayBeNull="false">
/// Event arguments for the itemOver event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('itemOver');
if (handler) {
handler(this, eventArgs);
}
},
add_itemOut : function(handler) {
/// <summary>
/// Add an event handler for the itemOut event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().addHandler('itemOut', handler);
},
remove_itemOut : function(handler) {
/// <summary>
/// Remove an event handler from the itemOut event
/// </summary>
/// <param name="handler" type="Function" mayBeNull="false">
/// Event handler
/// </param>
/// <returns />
this.get_events().removeHandler('itemOut', handler);
},
raiseItemOut : function(eventArgs) {
/// <summary>
/// Raise the itemOut event
/// </summary>
/// <param name="eventArgs" type="AjaxControlToolkit.AutoCompleteItemEventArgs" mayBeNull="false">
/// Event arguments for the itemOut event
/// </param>
/// <returns />
var handler = this.get_events().getHandler('itemOut');
if (handler) {
handler(this, eventArgs);
}
}
}
AjaxControlToolkit.AutoCompleteBehavior.registerClass('AjaxControlToolkit.AutoCompleteBehavior', AjaxControlToolkit.BehaviorBase);
AjaxControlToolkit.AutoCompleteBehavior.descriptor = {
properties: [ {name: 'completionInterval', type: Number},
{name: 'completionList', isDomElement: true},
{name: 'completionListElementID', type: String},
{name: 'completionSetCount', type: Number},
{name: 'minimumPrefixLength', type: Number},
{name: 'serviceMethod', type: String},
{name: 'servicePath', type: String},
{name: 'enableCaching', type: Boolean} ]
}
AjaxControlToolkit.AutoCompleteItemEventArgs = function(item, text, value) {
/// <summary>
/// Event arguments used when the itemSelected event is raised
/// </summary>
/// <param name="item" type="Sys.UI.DomElement" DomElement="true" mayBeNull="true">
/// Item
/// </param>
/// <param name="text" type="String" mayBeNull="true">
/// Text of the item
/// </param>
/// <param name="value" type="String" mayBeNull="true" optional="true">
/// Value of the item different from text if specifically returned by the webservice
/// as autocomplete json text/value item(using AutoComplete.CreateAutoCompleteItem); otherwise same as text.
/// </param>
AjaxControlToolkit.AutoCompleteItemEventArgs.initializeBase(this);
this._item = item;
this._text = text;
this._value = (value !== undefined) ? value : null;
}
AjaxControlToolkit.AutoCompleteItemEventArgs.prototype = {
get_item : function() {
/// <value type="Sys.UI.DomElement" DomElement="true" mayBeNull="true">
/// Item
/// </value>
return this._item;
},
set_item : function(value) {
this._item = value;
},
get_text : function() {
/// <value type="String" maybeNull="true">
/// Text of the item
/// </value>
return this._text;
},
set_text : function(value) {
this._text = value;
},
get_value : function() {
/// <value type="String" maybeNull="true">
/// Value of the item different from text if specifically returned by the webservice
/// as autocomplete json text/value item(using AutoComplete.CreateAutoCompleteItem); otherwise same as text.
/// </value>
return this._value;
},
set_value : function(value) {
this._value = value;
}
}
AjaxControlToolkit.AutoCompleteItemEventArgs.registerClass('AjaxControlToolkit.AutoCompleteItemEventArgs', Sys.EventArgs);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -