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






Specifies the client side (JavaScript) function that will be invoked after the update process is done.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after the update process is done.")>
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<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.EventParameterAttribute("controlId, tblName, rowObject, xmlResponseObject")>
<DefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
Public Property OnAfterUpdate As String
Visual Basic (Usage)Copy Code
Dim instance As ClientEvents
Dim value As String
 
instance.OnAfterUpdate = value
 
value = instance.OnAfterUpdate
C# 
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after the update process is done.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[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.EventParameterAttribute("controlId, tblName, rowObject, xmlResponseObject")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public string OnAfterUpdate {get; set;}
Delphi 
public read-write property OnAfterUpdate: String; 
JScript 
DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after the update process is done.")
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
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.EventParameterAttribute("controlId, tblName, rowObject, xmlResponseObject")
DefaultValueAttribute()
NotifyParentPropertyAttribute()
public function get,set OnAfterUpdate : String
Managed Extensions for C++ 
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after the update process is done.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[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.EventParameterAttribute("controlId, tblName, rowObject, xmlResponseObject")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public: __property string* get_OnAfterUpdate();
public: __property void set_OnAfterUpdate( 
   string* value
);
C++/CLI 
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked after the update process is done.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[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.EventParameterAttribute("controlId, tblName, rowObject, xmlResponseObject")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public:
property String^ OnAfterUpdate {
   String^ get();
   void set (    String^ value);
}

Example

The sample below shows you how to display message box after user has finished edited the value in row
C#Copy Code
WebGrid1.LayoutSettings.ClientSideEvents.OnAfterUpdate = "WebGrid1_OnAfterUpdate";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function WebGrid1_OnAfterUpdate(controlId, tblName, rowObject, xmlResponseObject) 
{ 
   var WebGrid1 = ISGetObject(controlId); 

   alert("Update Completed"); 

   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.

tblName

The Table's Name.

rowObject

The updated row object containing cells information.

xmlResponseObject

The XML object containing response information from server.

 

The RowObject contains following properties:

gridId

The ID of the grid.

tblName

The Table's Name of the updated row.

cells

The array of cellObject containing cell information.

parentConstraints

The value of the parent keys if updated row's table is childtable.

keyValue

The value of the DataValueField for the given row. (Blank for AddRow request)

 

The CellObject contains following properties:

text

The new text of the cell.

value

The new value of the cell.

columnName

The column name of the cell.

modified

The value indicates whether the cell is modified during edit mode.

oldText

The old text of the cell.

oldValue

The old value of the cell.

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.