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






row
The new row object contains cells data.
Invoked when the grid is about to add new row to the DataSource. Use this event to handle adding functionality to the data source such as calling Sql's stored procedures or invoke custom business class' method.

Syntax

Visual Basic (Declaration) 
Public Overridable Function OnAddRow( _
   ByVal row As WebGridRow _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim row As WebGridRow
Dim value As Boolean
 
value = instance.OnAddRow(row)
C# 
public virtual bool OnAddRow( 
   WebGridRow row
)
Delphi 
public function OnAddRow( 
    row: WebGridRow
): Boolean; virtual; 
JScript 
public function OnAddRow( 
   row : WebGridRow
) : boolean;
Managed Extensions for C++ 
public: virtual bool OnAddRow( 
   WebGridRow* row
) 
C++/CLI 
public:
virtual bool OnAddRow( 
   WebGridRow^ row
) 

Parameters

row
The new row object contains cells data.

Return Value

Returns ReturnValue. If the ReturnValue is False, the grid will not automatically add the new datarow to the DataSource.

Example

 

Remarks

By default, WebGrid will automatically perform DataRow addition to the respective DataTable object. However, WebGrid doesn't perform any insert or updates to the physical database recognizing the heterogeneous data source behavior that Microsoft .NET supports and the complexity of application scenario. Therefore, the WebGrid provides the OnAddRow event to allow developers to handle the physical datasource updates and assign back the primary key value to the provided DataRow object for consistency of the rendering purpose.

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

Concepts

Editing Environment

©2012 Intersoft Solutions Corp. All Rights Reserved.