The version that you requested is unavailable. We've redirected you to the latest version of the help.
Version

UpdateMode Enumeration

Used for specifying how the bound IList is updated when any changes are made to the data displayed in the grid. Default UpdateMode when not specified is OnRowChangeOrLostFocus.
Syntax
'Declaration
 
Public Enum UpdateMode 
   Inherits System.Enum
public enum UpdateMode : System.Enum 
Members
MemberDescription
OnCellChangethe Bound IList is updated when the user modifies a cell and exits the edit mode
OnCellChangeOrLostFocusthe Bound IList is updated when the user modifies a cell and exits the edit mode or when the grid loses the focus
OnRowChangethe Bound IList is updated when the user modifies cell(s) in a row and then selects a different row
OnRowChangeOrLostFocusthe Bound IList is updated when the user modifies cell(s) in a row and then selects a different row or the grid loses focus
OnUpdatethe Bound IList is updated when Update function on the Grid is called
Example
UpdateMode indicates when the UltraGrid updates rows as they are modified. When set to OnRowChange, the UltraGrid updates the modified row once the user moves off the row to a different row (ie when UltraGridBase.ActiveRow changes). When set to OnCellChange, the UltraGrid updates the row once the user moves off the modified cell to a different cell even when that different cell is in the same row. Update modes of OnRowChangeOrLostFocus and OnCellChangeOrLostFocus work in the same way except that the UltraGrid will update the row whenever the UltraGrid looses focus. Default is OnRowChangeOrLostFocus. Following code sets the UpdateMode in Form's Load and in BeforeRowUpdate event writes out whenever the row is being updated.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

Private Sub Form1_Load(sender as object, e as System.EventArgs) Handles MyBase.Load
	
	Me.OleDbDataAdapter1.Fill( Me.DataSet21 )

	' Bind the UltraGrid to a data source whose underlying row objects implement
	' IEditableObject interface to demonstrate the UpdateData method.
	Me.UltraGrid1.DataSource = Me.DataSet21

      ' Set the UpdateMode to OnRowChange. BeforeRowUpdate event handler below prints
      ' out whenever a row is being updated.
      Me.ultraGrid1.UpdateMode = UpdateMode.OnRowChange

End Sub
		
  Private Sub UltraGrid1_BeforeRowUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelableRowEventArgs) Handles ultraGrid1.BeforeRowUpdate

      ' Following code will write out whenever the row is being updated to illustate when a
      ' modified row gets updated with various UpdateMode settings.

      Debug.WriteLine("Canceling the row update on row with list index of " & e.Row.ListIndex)

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void Form1_Load(object sender, System.EventArgs e)
{		
	
	this.oleDbDataAdapter1.Fill( this.dataSet21 );	

	// Bind the UltraGrid to a data source whose underlying row objects implement
	// IEditableObject interface to demonstrate the UpdateData method.
	this.ultraGrid1.DataSource = this.dataSet21;

	// Set the UpdateMode to OnRowChange. BeforeRowUpdate event handler below prints
	// out whenever a row is being updated.
	this.ultraGrid1.UpdateMode = UpdateMode.OnRowChange;

}
		
private void ultraGrid1_BeforeRowUpdate(object sender, Infragistics.Win.UltraWinGrid.CancelableRowEventArgs e)
{

	// Following code will write out whenever the row is being updated to illustate when a
	// modified row gets updated with various UpdateMode settings.

	Debug.WriteLine( "Canceling the row update on row with list index of " + e.Row.ListIndex );

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also