Version

IsDeleted Property

Returns True if the row has been deleted but the UltraGridRow object has not yet been destroyed.
Syntax
'Declaration
 
Public ReadOnly Property IsDeleted As Boolean
public bool IsDeleted {get;}
Example
Following code shows you how to delete a row programmatically by calling Delete on the UltraGridRow object.

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

  Private Sub Button69_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button69.Click

      ' Get the row to delete. In this case we will use the active row.
      Dim row As UltraGridRow = Me.UltraGrid1.ActiveRow

      If Not row Is Nothing Then
          ' Delete the row by calling Delete method. Enclose the call in a try-catch
          ' block so if there is an error, we can catch it and show an error message box
          ' to the user.
          Try
              row.Delete()

              ' IsDeleted should be true after a row has been deleted.
              Debug.WriteLine("Row.IsDeleted = " & row.IsDeleted)
          Catch exc As Exception
              MessageBox.Show("Error occured during deleting the row.\n" & exc.Message, _
                              "Error deleting row", MessageBoxButtons.OK, MessageBoxIcon.Error)
          End Try
      Else
          ' If there is no active row, then prompt the user to select one.
          MessageBox.Show("Please select a single row to delete.")
      End If

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

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

	// Get the row to delete. In this case we will use the active row.
	UltraGridRow row = this.ultraGrid1.ActiveRow;

	if ( null != row )
	{
		// Delete the row by calling Delete method. Enclose the call in a try-catch
		// block so if there is an error, we can catch it and show an error message box
		// to the user.
		try
		{
			row.Delete( );

			// IsDeleted should be true after a row has been deleted.
			Debug.WriteLine( "Row.IsDeleted = " + row.IsDeleted );
		}
		catch ( Exception exc )
		{
			MessageBox.Show( "Error occured during deleting the row.\n" + exc.Message, 
					"Error deleting row", MessageBoxButtons.OK, MessageBoxIcon.Error );
		}
	}
	else
	{
		// If there is no active row, then prompt the user to select one.
		MessageBox.Show( "Please select a single row to delete." );
	}

}
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