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






row
Invoked when deleting row is performed using code.

Syntax

Visual Basic (Declaration) 
Public Overridable Function OnDeleteRow( _
   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.OnDeleteRow(row)
C# 
public virtual bool OnDeleteRow( 
   WebGridRow row
)
Delphi 
public function OnDeleteRow( 
    row: WebGridRow
): Boolean; virtual; 
JScript 
public function OnDeleteRow( 
   row : WebGridRow
) : boolean;
Managed Extensions for C++ 
public: virtual bool OnDeleteRow( 
   WebGridRow* row
) 
C++/CLI 
public:
virtual bool OnDeleteRow( 
   WebGridRow^ row
) 

Parameters

row

Example

 

This example below shows you to delete a row programmatically using DeleteRow event.
C#Copy Code
private void WebGrid1_DeleteRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
   DataSet ds = (DataSet)WebGrid1.DataSource;

   if (e.Row.Table.DataMember == "Customers") 
   {
    // deleted row is for Customers table.
    // use proper dataadapter and call Update.
    oleDbDataAdapter1.Update(ds.Tables["Customers"]);
   } 
   else 
   {
    oleDbDataAdapter2.Update(ds.Tables["Orders"]);
   }
}

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.