DataRowChangeEventArgs(DataRow, DataRowAction) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DataRowChangeEventArgs class.
public:
DataRowChangeEventArgs(System::Data::DataRow ^ row, System::Data::DataRowAction action);
public DataRowChangeEventArgs (System.Data.DataRow row, System.Data.DataRowAction action);
new System.Data.DataRowChangeEventArgs : System.Data.DataRow * System.Data.DataRowAction -> System.Data.DataRowChangeEventArgs
Public Sub New (row As DataRow, action As DataRowAction)
Parameters
- action
- DataRowAction
One of the DataRowAction values.
Examples
The following example adds a DataRowChangeEventHandler and the procedure to handle the event when a row is changed.
Private dataTable As DataTable
Private Sub [AddHandler]()
dataTable = CType(DataGrid1.DataSource, DataTable)
AddHandler dataTable.RowChanged, AddressOf Me.dataTable_Changed
End Sub
Private Sub dataTable_Changed _
(ByVal sender As System.Object, ByVal e As System.Data.DataRowChangeEventArgs)
Console.WriteLine("Row Changed", e.Action, e.Row.Item(DataGrid1.CurrentCell.ColumnNumber))
End Sub
Applies to
See also
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา