Version

Update Method (UltraGridRow)

Updates the data source with any modified information from the grid.
Overload List
OverloadDescription
Update()Updates the data source with any modified information from the grid.  
Example
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

       ' Assign the UpdateMode to OnRowChange to test code below. If it's left
       ' to its default value of OnRowChangeOrLostFocus, then clicking on the button will cause the
       ' UltraGrid to lose focus and update the row before the button handler gets executed and we
       ' won't be able to illustrate the DataChanged and Update methods below.
       Me.ultraGrid1.UpdateMode = UpdateMode.OnRowChange

   End Sub

   Private Sub Button65_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button65.Click

       ' Following code updates the active row if it has been modified. To test 
       ' this sample code out, modify one or more cells and then call this method
       ' on the 

       Dim row As UltraGridRow = Me.ultraGrid1.ActiveRow

       If Not row Is Nothing Then

           ' Check to see if the user has modified the data in the row.
           If row.DataChanged Then
               ' Update the row. This will call EndEdit on the underlying data row.
               row.Update()
               Debug.WriteLine("After Update row.DataChanged = " & row.DataChanged)
           Else
               Debug.WriteLine("The row has not been modified since last updated.")
           End If

       Else
           Debug.WriteLine("No active row.")
       End If

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

private void Form1_Load(object sender, System.EventArgs e)
{

	// Assign the UpdateMode to OnRowChange to test code below. If it's left
	// to its default value of OnRowChangeOrLostFocus, then clicking on the button will cause the
	// UltraGrid to lose focus and update the row before the button handler gets executed and we
	// won't be able to illustrate the DataChanged and Update methods below.
	this.ultraGrid1.UpdateMode = UpdateMode.OnRowChange;

}

private void button65_Click(object sender, System.EventArgs e)
{

	// Following code updates the active row if it has been modified. To test 
	// this sample code out, modify one or more cells and then call this method
	// on the 

	UltraGridRow row = this.ultraGrid1.ActiveRow;

	if ( null != row  )
	{
		// Check to see if the user has modified the data in the row.
		if ( row.DataChanged )
		{
			// Update the row. This will call EndEdit on the underlying data row.
			row.Update( );
			Debug.WriteLine( "After Update row.DataChanged = " + row.DataChanged );
		}
		else
		{
			Debug.WriteLine( "The row has not been modified since last updated." );
		}
	}
	else
	{
		Debug.WriteLine( "No active row." );
	}

}
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