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






Specifies the client side (JavaScript) function that will be invoked when edit mode is being ended.

Syntax

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

Example

The following is the example on how to assign a javascript function to the client side event.
C#Copy Code
WebGrid1.LayoutSettings.ClientSideEvents.OnExitEditMode = "WebGrid1_ExitEditMode";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function WebGrid1_OnExitEditMode(controlId, tblName, editObject)
{ 
     var WebGrid1 = ISGetObject(controlId); 

     alert("The value updated is " + editObject.element.value); 

     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.

editObject

The object containing edit information.

 

The EditObject contains following properties:

gridId

The ID of the grid of edited cell.

tblName

The Table's Name of edited cell.

type

The EditType of the cell.

element

The HTML element of the edit object.

cellElement

The HTML element of the edited 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

Tasks

How-to: Calculate a cell after a value is filled
How-to: Modify other cell's value based on the selected value using OnExitEditMode

Concepts

Events

©2012 Intersoft Solutions Corp. All Rights Reserved.