Version

IsAddRow Property

Indicates whether this row is an add-row.
Syntax
'Declaration
 
Public ReadOnly Property IsAddRow As Boolean
public bool IsAddRow {get;}
Remarks

There can only be one add-row at a time. When a new row is added, this property for that row will return True. Any previously added rows will return False from this property. When the add-row is updated, it will cease being an add-row and return False from this property. Also note that regardless of the UltraGrid.UpdateMode settings, the add-row will not be updated until another row is activated. This means that even if you set the UpdateMode to OnCellChange or OnCellChangeOrLostFocus, the IsAddRow property will return True until the row loses focus. You can explicitly update an add-row by using the row's Update method.

Example
Following code programmatically adds a new row for Customers band in the UltraGrid. When you call AddNew off the band, it adds the row under the parent row that's the active row if the band is a child band.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Button24_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button24.Click

       ' AddNew method throws an exception if adding is not allowed or conditions
       ' don't exist for such an operation to succeed.
       Try
           Dim addedRow As UltraGridRow = Me.ultraGrid1.DisplayLayout.Bands("Customers").AddNew()

           ' IsAddRow should be true since the row is an add row (until it's updated).
           Debug.WriteLine("Row.IsAddRow = " & addedRow.IsAddRow)
       Catch exc As Exception
           Debug.WriteLine("Exception thrown by AddNew: " & exc.Message)
       End Try

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

private void button24_Click(object sender, System.EventArgs e)
{
	// AddNew method throws an exception if adding is not allowed or conditions
	// don't exist for such an operation to succeed.

	try
	{
		UltraGridRow addedRow = this.ultraGrid1.DisplayLayout.Bands["Customers"].AddNew( );

		// IsAddRow should be true since the row is an add row (until it's updated).
		Debug.WriteLine( "Row.IsAddRow = " + addedRow.IsAddRow );
	}
	catch ( Exception exc )
	{
		Debug.WriteLine( "Exception thrown by AddNew: " + exc.Message );
	}
}
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