Ajax Control Toolkit DynamicPopulate
Modified on 2010/04/16 00:20 by Stephen Walther — Categorized as: Uncategorized
DynamicPopulate is an extender that replaces the contents of a control with the result of a Web service or page method call. The method call returns a string of HTML that is inserted as a child of the target element.
DynamicPopulate Client Reference
Sys.Extended.UI.DynamicPopulateBehavior Class
Summary - Replaces the contents of an element with the result of a Web service or page method call. The method call returns a string of HTML that is inserted as a child of the target element.
Parameters - Sys.UI.DomElement element
Events
populating(handler)
- Adds or removes an event handler for the
populating
event.
Parameters - A function that represents the event handler.
populated(handler)
- Adds or removes an event handler for the
populated
event.
Parameters - A function that represents the event handler.
Methods
initialize()
- Initializes the DynamicPopulate behavior.
dipose()
- Disposes the DynamicPopulate behavior.
populate(contextKey)
- Uses the dymanic content to populate the target element.
Parameters - A string to pass to the Web service method or page method.
Remarks - Example: If the element to populate is in a data-bound repeating control, the
contextKey
parameter can be the ID of the current row.
setStyle(updating)
- Sets the style of the display.
Parameter - A Boolean value that specifies whether the display is being updated.
raisePopulating(eventArgs)
- Raises the
populating
event.
Parameters - A Sys.EventArgs eventArgs that represents event arguments for the
populating
event
raisePopulated(eventArgs)
- Raises the
populated
event.
Parameters - A Sys.EventArgs object that represents event arguments for the
populated
event.
Properties
ClearContentsDuringUpdate
- Gets or sets a Boolean value that specifies whether the contents of the target should be cleared when an update begins.
contextKey
- Gets or sets a string to pass to the Web method.
Remarks - For example, if the element to populate is in a data-bound repeating control, this can be the ID of the current row.
PopulateTriggerID
- Gets or sets the name of an element that can be clicked to trigger the action of populating of the target element.
ServicePath
- Gets or sets the URL of the Web service to call.
Remarks - This property is optional. If the
ServicePath
property is not set, a page method is invoked instead of a Web service.
ServiceMethod
- Gets or sets the name of the method to call on the Web service or page.
cacheDynamicResults
- Gets or sets a Boolean value that specifies whether the results of populating the target element should be cached and not fetched again after the first load.
UpdatingCssClass
- Gets or sets the name of the CSS class to apply to the target during asynchronous calls.
CustomScript
- Gets or sets the script to invoke instead of calling a Web service method or a page method.
DynamicPopulate Client Reference
Sys.Extended.UI.DynamicPopulateBehavior Class
Summary - Replaces the contents of an element with the result of a Web service or page method call. The method call returns a string of HTML that is inserted as a child of the target element.
Parameters - Sys.UI.DomElement element
Events
populating(handler)
- Adds or removes an event handler for the
populating
event.
Parameters - A function that represents the event handler.
populated(handler)
- Adds or removes an event handler for the
populated
event.
Parameters - A function that represents the event handler.
Methods
initialize()
- Initializes the DynamicPopulate behavior.
dipose()
- Disposes the DynamicPopulate behavior.
populate(contextKey)
- Uses the dymanic content to populate the target element.
Parameters - A string to pass to the Web service method or page method.
Remarks - Example: If the element to populate is in a data-bound repeating control, the
contextKey
parameter can be the ID of the current row.
setStyle(updating)
- Sets the style of the display.
Parameter - A Boolean value that specifies whether the display is being updated.
raisePopulating(eventArgs)
- Raises the
populating
event.
Parameters - A Sys.EventArgs eventArgs that represents event arguments for the
populating
event
raisePopulated(eventArgs)
- Raises the
populated
event.
Parameters - A Sys.EventArgs object that represents event arguments for the
populated
event.
Properties
ClearContentsDuringUpdate
- Gets or sets a Boolean value that specifies whether the contents of the target should be cleared when an update begins.
contextKey
- Gets or sets a string to pass to the Web method.
Remarks - For example, if the element to populate is in a data-bound repeating control, this can be the ID of the current row.
PopulateTriggerID
- Gets or sets the name of an element that can be clicked to trigger the action of populating of the target element.
ServicePath
- Gets or sets the URL of the Web service to call.
Remarks - This property is optional. If the
ServicePath
property is not set, a page method is invoked instead of a Web service.
ServiceMethod
- Gets or sets the name of the method to call on the Web service or page.
cacheDynamicResults
- Gets or sets a Boolean value that specifies whether the results of populating the target element should be cached and not fetched again after the first load.
UpdatingCssClass
- Gets or sets the name of the CSS class to apply to the target during asynchronous calls.
CustomScript
- Gets or sets the script to invoke instead of calling a Web service method or a page method.