Intersoft WebGrid Documentation
UpdateRow Event
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : UpdateRow Event






Occurs when updating a row is performed.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute()>
<CategoryAttribute("Behavior")>
Public Event UpdateRow As UpdateRowEventHandler
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim handler As UpdateRowEventHandler
 
AddHandler instance.UpdateRow, handler
C# 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public event UpdateRowEventHandler UpdateRow
Delphi 
public event UpdateRow: UpdateRowEventHandler; 
JScript 
In JScript, you can handle the events defined by another class, but you cannot define your own.
Managed Extensions for C++ 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public: __event UpdateRowEventHandler* UpdateRow
C++/CLI 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public:
event UpdateRowEventHandler^ UpdateRow

Event Data

The event handler receives an argument of type RowEventArgs containing data related to this event. The following RowEventArgs properties provide information specific to this event.

PropertyDescription
ReturnValue (Inherited from ISNet.WebUI.WebGrid.BaseEventArgs) 
Row Gets the WebGridRow object used by the event.

Example

 

The following sample codes show you how to perform physical update on a database using UpdateRow Event.
C#Copy Code
private void WebGrid1_UpdateRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
     DataSet ds = (DataSet)WebGrid1.DataSource;

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

Remarks

Using UpdateRow Event, developers can write their own own implementation of update codes. To learn more on this event and editing functionalities you can read Editing Environment.

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.