Infragistics(R) NetAdvantage(R) Windows Forms
EmptyRowStyle Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : EmptyRowStyle Enumeration

Enum for specifying EmptyRowSettings.Style property.

Syntax

Visual Basic (Declaration) 
Public Enum EmptyRowStyle 
   Inherits System.Enum
C# 
public enum EmptyRowStyle : System.Enum 

Members

MemberDescription
AlignWithDataRows Does not extend the empty rows. They are aligned with the data rows.
ExtendFirstCell Aligns the empty rows with the left edge of the UltraGrid (more precisely the scroll region) by extending left the first visible cell of each row.
ExtendRowSelector Aligns the empty rows with the left edge of the UltraGrid (more precisely the scroll region) by extending left the row selector of each row.
HideRowSelectorAligns the empty rows with the data rows however the row selector is hidden. In its place the first cell is extended to occupy the space where the row selector would have been. If row selectors are not enabled then this option behaves the same as AlignWithDataRows.
PrefixWithEmptyCellThe area before the first cell is contains an empty cell. This option behaves the same as ExtendFirstCell except instead of extending the first cell to occupy the space between the left edge of the grid and the row, another cell is displayed.

Example

The following code enables the empty rows feature and shows some of the properties related to the feature.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
        ' To enable empty row settings set the ShowEmptyRows property to true.
        e.Layout.EmptyRowSettings.ShowEmptyRows = True

        ' Style property controls how the empty rows look. It controls aspects like
        ' whether the row selectors of empty rows are displayed, whether the empty
        ' rows are extended left to occupy pre row area space and if so how they are
        ' extended etc...
        e.Layout.EmptyRowSettings.Style = EmptyRowStyle.PrefixWithEmptyCell

        ' CellAppearance property of EmptyRowSettings controls the appearance of 
        ' cells of empty rows.
        e.Layout.EmptyRowSettings.CellAppearance.BackColor = Color.LightYellow

        ' RowAppearance property of EmptyRowSettings controls the appearance of 
        ' empty rows.
        e.Layout.EmptyRowSettings.RowAppearance.BackColor = Color.LightYellow

        ' RowSelectorAppearance property of EmptyRowSettings controls the appearance 
        ' of row selectors of empty rows, if the row selectors of empty rows are visible.
        e.Layout.EmptyRowSettings.RowSelectorAppearance.BackColor = Color.Gray

        ' EmptyAreaAppearance property of EmptyRowSettings controls the appearance
        ' of the empty rows area. Empty rows area contains all the empty rows.
        e.Layout.EmptyRowSettings.EmptyAreaAppearance.BackColor = SystemColors.Window

    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void UltraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// To enable empty row settings set the ShowEmptyRows property to true.
			e.Layout.EmptyRowSettings.ShowEmptyRows = true;

			// Style property controls how the empty rows look. It controls aspects like
			// whether the row selectors of empty rows are displayed, whether the empty
			// rows are extended left to occupy pre row area space and if so how they are
			// extended etc...
			e.Layout.EmptyRowSettings.Style = EmptyRowStyle.PrefixWithEmptyCell;

			// CellAppearance property of EmptyRowSettings controls the appearance of 
			// cells of empty rows.
			e.Layout.EmptyRowSettings.CellAppearance.BackColor = Color.LightYellow;

			// RowAppearance property of EmptyRowSettings controls the appearance of 
			// empty rows.
			e.Layout.EmptyRowSettings.RowAppearance.BackColor = Color.LightYellow;

			// RowSelectorAppearance property of EmptyRowSettings controls the appearance 
			// of row selectors of empty rows, if the row selectors of empty rows are visible.
			e.Layout.EmptyRowSettings.RowSelectorAppearance.BackColor = Color.Gray;

			// EmptyAreaAppearance property of EmptyRowSettings controls the appearance
			// of the empty rows area. Empty rows area contains all the empty rows.
			e.Layout.EmptyRowSettings.EmptyAreaAppearance.BackColor = SystemColors.Window;
		}

Remarks

See Also