Intersoft WebGrid Documentation
OnButtonClick Method
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : OnButtonClick Method






table
A reference to the WebGridTable object.
column

The column name of the clicked button.

cellValue

The button cell's value. This value is available for Bound column and DataMember is specified.

Invoked when a button is clicked in client and ButtonAutoPostBack is set to True.

Syntax

Visual Basic (Declaration) 
Public Overridable Function OnButtonClick( _
   ByVal table As WebGridTable, _
   ByVal column As WebGridColumn, _
   ByVal cellValue As String _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim table As WebGridTable
Dim column As WebGridColumn
Dim cellValue As String
Dim value As Boolean
 
value = instance.OnButtonClick(table, column, cellValue)
C# 
public virtual bool OnButtonClick( 
   WebGridTable table,
   WebGridColumn column,
   string cellValue
)
Delphi 
public function OnButtonClick( 
    table: WebGridTable;
    column: WebGridColumn;
    cellValue: String
): Boolean; virtual; 
JScript 
public function OnButtonClick( 
   table : WebGridTable,
   column : WebGridColumn,
   cellValue : String
) : boolean;
Managed Extensions for C++ 
public: virtual bool OnButtonClick( 
   WebGridTable* table,
   WebGridColumn* column,
   string* cellValue
) 
C++/CLI 
public:
virtual bool OnButtonClick( 
   WebGridTable^ table,
   WebGridColumn^ column,
   String^ cellValue
) 

Parameters

table
A reference to the WebGridTable object.
column

The column name of the clicked button.

cellValue

The button cell's value. This value is available for Bound column and DataMember is specified.

Return Value

Returns the ReturnValue.

Remarks

The user-defined function should only contain the name of the function. For example, "HandleEvent". This event allow developers to easily capture the button click event and process implementation further. Button ColumnType now has ability to perform postback to server automatically by setting the ButtonAutoPostBack to True. You can even choose whether the postback would be performed using OnTheFly(tm) postback for fast response or FullPageRefresh. This setting can be found in ButtonPostBackMode property. When ButtonAutoPostback is set to True, the ButtonClick server event will be invoked as well for both PostBackMode. You can cancel postback to occur by setting the return to false in this event.

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

WebGrid Class
WebGrid Members

Tasks

How-to: Perform Bulk Update on a Button Click event

Concepts

Extensible Client side API Programming

©2012 Intersoft Solutions Corp. All Rights Reserved.