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






Specifies the client side (JavaScript) function that will be invoked when rowSelector is clicked.

Syntax

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

Property Value

Returns return 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.OnRowSelectorClick = "WebGrid1_DoRowSelectorClick";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function DoRowSelectorClick(gridId, tblName, rowIndex, rowEl) 
{ 
     var WebGrid1 = ISGetObject(controlId);

     alert("The ID of selected row is " + rowEl.cells[7].innerText);

     return true; 
}

Remarks

You can specify user-defined Javascript function to respond when rowSelector is clicked. The user-defined function should only contain the name of the function. For example, "DoRowSelectorClick".

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.

rowIndex

The rowIndex of the clicked rowSelector.

rowEl

The clicked row's element.

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.