Intersoft WebGrid Documentation
ClientSideAction Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : ClientSideAction Class






Class that bridge the gaps between client and server using OnTheFly postback architecture.

Object Model

ClientSideAction Class

Syntax

Visual Basic (Declaration) 
Public Class ClientSideAction 
   Inherits ISNet.WebUI.BaseClientSideAction
Visual Basic (Usage)Copy Code
Dim instance As ClientSideAction
C# 
public class ClientSideAction : ISNet.WebUI.BaseClientSideAction 
Delphi 
public class ClientSideAction = class(ISNet.WebUI.BaseClientSideAction)
JScript 
public class ClientSideAction extends ISNet.WebUI.BaseClientSideAction
Managed Extensions for C++ 
public __gc class ClientSideAction : public ISNet.WebUI.BaseClientSideAction 
C++/CLI 
public ref class ClientSideAction : public ISNet.WebUI.BaseClientSideAction 

Example

 

The following example shows you how to use set value, assign a WebStyle to any valid HTML elements using ClientAction.
C#Copy Code
// set textbox1 value dynamically

WebGrid1.ClientAction.SetValue(TextBox1, e.Row.KeyValue.ToString());
ISNet.WebUI.WebStyle style = new ISNet.WebUI.WebStyle();
style.BackColor = Color.Red;
style.ForeColor = Color.White;

// take advantage of Framework's rich WebStyle and
// set it to the TextBox1 style dynamically

WebGrid1.ClientAction.SetStyle(TextBox1, style);
webGrid1.ClientAction.SetValue(TextBox2, "New Value");

Remarks

ClientSideAction feature acts as the bridge between client and server allowing clientside's functions and tasks to be executed on server-side during OnTheFly Postback. This results in smother interactions and much less codes and times needed for complex scenarios. This feature is only applicable during OnTheFly Postback, you cannot use it in full Postback. 

There are two types of predefined client actions, one is in global scope, means that it does not require grid’s instance, for example, Alert, NavigateTo, OpenWindow and so on. The other is in grid’s scope, such as Refresh, SetFocus, SetStatus and so on. These kind of actions can also be applied to different grid instance, for example, you can call WebGrid2.ClientAction.Refresh() while the grid performing OnTheFly Postback is WebGrid1. This capability will enable you to create any types of interactive web applications easier than ever before. For more information you can read

Inheritance Hierarchy

System.Object
   ISNet.WebUI.BaseClientSideAction
      ISNet.WebUI.WebGrid.ClientSideAction

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

©2012 Intersoft Solutions Corp. All Rights Reserved.