'宣言 Public ReadOnly Property Column As UltraDataColumn
public UltraDataColumn Column {get;}
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDataSource Imports Infragistics.Win.UltraWinGrid Private Sub UltraDataSource1_CellDataUpdating(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDataSource.CellDataUpdatingEventArgs) Handles UltraDataSource1.CellDataUpdating ' CellDataUpdating is fired when a field is modified in a control bound ' to this data source. Typically you update the external data source with ' the new value if there is an external data source. Debug.WriteLine( _ e.Column.Key & " field " & " in row " & e.Row.Index _ & " is being updated to new value of " & e.NewValue.ToString()) ' If there is an external data source that's being used to provide the ' data to the ultradata source and that external data source is updated ' with the new value, you would set the CacheData to false since you ' don't want the UltraDataSource to keep the value. e.CacheData = False ' You can also set the Cancel to true to prevent the UltraDataSource ' from updating with the new value. e.Cancel = True End Sub Private Sub UltraDataSource1_CellDataUpdated(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDataSource.CellDataUpdatedEventArgs) Handles UltraDataSource1.CellDataUpdated ' CellDataUpdated is fired after CellDataUpdating is fired. Debug.WriteLine( _ e.Column.Key & " field " & " in row " & e.Row.Index _ & " is updated to new value of " & e.NewValue.ToString()) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDataSource; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraDataSource1_CellDataUpdating(object sender, Infragistics.Win.UltraWinDataSource.CellDataUpdatingEventArgs e) { // CellDataUpdating is fired when a field is modified in a control bound // to this data source. Typically you update the external data source with // the new value if there is an external data source. Debug.WriteLine( e.Column.Key + " field " + " in row " + e.Row.Index + " is being updated to new value of " + e.NewValue.ToString( ) ); // If there is an external data source that's being used to provide the // data to the ultradata source and that external data source is updated // with the new value, you would set the CacheData to false since you // don't want the UltraDataSource to keep the value. e.CacheData = false; // You can also set the Cancel to true to prevent the UltraDataSource // from updating with the new value. e.Cancel = true; } private void ultraDataSource1_CellDataUpdated(object sender, Infragistics.Win.UltraWinDataSource.CellDataUpdatedEventArgs e) { // CellDataUpdated is fired after CellDataUpdating is fired. Debug.WriteLine( e.Column.Key + " field " + " in row " + e.Row.Index + " is updated to new value of " + e.NewValue.ToString( ) ); }