Intersoft WebGrid Documentation
OnActionDispatched Property
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > ClientEvents Class : OnActionDispatched Property






Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.

Syntax

Visual Basic (Declaration) 
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")>
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<NotifyParentPropertyAttribute(True)>
<ISNet.EventParameterAttribute("controlId, actionName")>
<DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.")>
<DefaultValueAttribute()>
Public Property OnActionDispatched As String
Visual Basic (Usage)Copy Code
Dim instance As ClientEvents
Dim value As String
 
instance.OnActionDispatched = value
 
value = instance.OnActionDispatched
C# 
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.EventParameterAttribute("controlId, actionName")]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.")]
[DefaultValueAttribute()]
public string OnActionDispatched {get; set;}
Delphi 
public read-write property OnActionDispatched: String; 
JScript 
EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
NotifyParentPropertyAttribute()
ISNet.EventParameterAttribute("controlId, actionName")
DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.")
DefaultValueAttribute()
public function get,set OnActionDispatched : String
Managed Extensions for C++ 
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.EventParameterAttribute("controlId, actionName")]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.")]
[DefaultValueAttribute()]
public: __property string* get_OnActionDispatched();
public: __property void set_OnActionDispatched( 
   string* value
);
C++/CLI 
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.EventParameterAttribute("controlId, actionName")]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after an FlyPostBack action is dispacthed during response.")]
[DefaultValueAttribute()]
public:
property String^ OnActionDispatched {
   String^ get();
   void set (    String^ value);
}

Example

The sample code below will show you how to display message on what was the last action done by user.
C#Copy Code
WebGrid1.LayoutSettings.ClientSideEvents.OnActionDispatched = "WebGrid1_OnActionDispatched";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function WebGrid1_OnActionDispatched(controlId, actionName) 
{ 
   var WebGrid1 = ISGetObject(controlId); 

   alert("Last action done: "+ actionName); 

   return true; 
}

Remarks

The user-defined function should only contain the name of the function. For example, "HandleEvent".

The function can be defined in either inline or linked JavaScript files and can accept following parameters:

gridId

The ID of the grid calling the function.

action

The action name of the processed request.

This event is invoked exactly after OnResponse client side event. The difference with OnResponse is that this event is fired only after a successful response, while OnResponse is invoked regardless of whether the response is success or fail (error). Developer is recommended to use this event to perform additional task after an action of response has been retrieved with success state.

This event is invoked before the actual default process handling of the action. If you would like to perform additional tasks after the default process handling then you're recommended to use OnAfterResponseProcess client side event.

Note that you should include the return value of your function. Returning a true value means that default behavior will be processed. Otherwise, the default behavior will be skipped.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Reference

ClientEvents Class
ClientEvents Members

Concepts

Events

©2012 Intersoft Solutions Corp. All Rights Reserved.