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






Gets or sets the client function directly from server code during OnTheFly Postback.

Syntax

Visual Basic (Declaration) 
<BrowsableAttribute(False)>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
<DescriptionAttribute("Returns ClientSideAction class.")>
Public ReadOnly Property ClientAction As ClientSideAction
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim value As ClientSideAction
 
value = instance.ClientAction
C# 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
[DescriptionAttribute("Returns ClientSideAction class.")]
public ClientSideAction ClientAction {get;}
Delphi 
public read-only property ClientAction: ClientSideAction; 
JScript 
BrowsableAttribute()
DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)
DescriptionAttribute("Returns ClientSideAction class.")
public function get ClientAction : ClientSideAction
Managed Extensions for C++ 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
[DescriptionAttribute("Returns ClientSideAction class.")]
public: __property ClientSideAction* get_ClientAction();
C++/CLI 
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
[DescriptionAttribute("Returns ClientSideAction class.")]
public:
property ClientSideAction^ ClientAction {
   ClientSideAction^ get();
}

Example

The sample code below is to show you how to refresh second grid after invoking send custom request of first grid
[C#]
private void WebGrid1_InitializePostBack(object sender,
ISNet.WebUI.WebGrid.PostbackEventArgs e)
{
    if (e.Action == PostBackAction.Custom) 
    {
        // perform business logic here
        WebGrid2.ClientAction.Refresh();
    }
}
The sample code below is to show you how to refresh second grid after invoking send custom request of first grid
C#Copy Code
private void WebGrid1_InitializePostBack(object sender,
ISNet.WebUI.WebGrid.PostbackEventArgs e)
{
    if (e.Action == PostBackAction.Custom) 
    {
        // perform business logic here
        WebGrid2.ClientAction.Refresh();
    }
}

Remarks

ClientAction is another great enhancement to the OnTheFly™ Postback architecture. This object is attached per grid instance and designed to bridge the gaps between client and server. It enables predefined client actions to be executed directly from server code during OnTheFly Postback, therefore avoiding writing unnecessary client-side codes.

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.

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.