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






Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<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")>
<NotifyParentPropertyAttribute(True)>
<ISNet.Serialization.XmlSerializableAttribute()>
<DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.")>
<ISNet.EventParameterAttribute("controlId")>
<ISNet.Serialization.BinarySerializableAttribute()>
Public Property OnInitialize As String
Visual Basic (Usage)Copy Code
Dim instance As ClientEvents
Dim value As String
 
instance.OnInitialize = value
 
value = instance.OnInitialize
C# 
[DefaultValueAttribute()]
[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")]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.")]
[ISNet.EventParameterAttribute("controlId")]
[ISNet.Serialization.BinarySerializableAttribute()]
public string OnInitialize {get; set;}
Delphi 
public read-write property OnInitialize: String; 
JScript 
DefaultValueAttribute()
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")
NotifyParentPropertyAttribute()
ISNet.Serialization.XmlSerializableAttribute()
DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.")
ISNet.EventParameterAttribute("controlId")
ISNet.Serialization.BinarySerializableAttribute()
public function get,set OnInitialize : String
Managed Extensions for C++ 
[DefaultValueAttribute()]
[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")]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.")]
[ISNet.EventParameterAttribute("controlId")]
[ISNet.Serialization.BinarySerializableAttribute()]
public: __property string* get_OnInitialize();
public: __property void set_OnInitialize( 
   string* value
);
C++/CLI 
[DefaultValueAttribute()]
[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")]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[DescriptionAttribute("Specifies the client side (JavaScript) function that will be invoked when the grid is in initialization process.")]
[ISNet.EventParameterAttribute("controlId")]
[ISNet.Serialization.BinarySerializableAttribute()]
public:
property String^ OnInitialize {
   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.OnInitialize = "WebGrid1_Initialize";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function WebGrid1_OnInitialize(controlId) 
{ 
   var WebGrid1 = ISGetObject(controlId); 

   alert("Initialize event is on progress");

   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.

This event is not cancelable.

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.