バージョン

FixedRowIndicator プロパティ

ユーザーが行を固定できるかどうか、およびどのように固定するかを指定します。このプロパティを Button に設定すると、行を固定および固定解除するための状態ボタンが行セレクターに表示されます。また、このボタンが収まるように行セレクターのデフォルトの幅が拡大します。このプロパティをNoneに設定すると、インジケーターは表示されません。デフォルト 値は None に解決されます。
シンタックス
'宣言
 
Public Property FixedRowIndicator As FixedRowIndicator
public FixedRowIndicator FixedRowIndicator {get; set;}
解説

ユーザーが行を固定できるかどうか、およびどのように固定するかを指定します。このプロパティを Button に設定すると、行を固定および固定解除するための状態ボタンが行セレクターに表示されます。また、このボタンが収まるように行セレクターのデフォルトの幅が拡大します。このプロパティをNoneに設定すると、インジケーターは表示されません。Default は None に解決されます。

注:固定行は子行コレクションではサポートされていません。子行でこのプロパティを設定しても効果はありません。固定行はカードビューでもサポートされていません。

また、固定行を展開したとき、その後に続く兄弟固定行は固定されない点にも注意してください。それらの行は、展開された固定行を縮小しない限り固定されません。ただし、FixedRows コレクションの中には残り、固定行の外観は維持されます。

使用例
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
        ' Set the fixed row style to Top. This indicates where the fixed rows
        ' are displayed.
        e.Layout.Override.FixedRowStyle = FixedRowStyle.Top

        ' Set the FixedRowIndicator to Button. This property can be set to None
        ' to prevent the user from fixing or unfixing rows via the user interface.
        e.Layout.Override.FixedRowIndicator = FixedRowIndicator.Button

        ' You can show or hide the fixed row indicator on an individual row using the
        ' AllowFixing property of the row.
        e.Layout.Rows(0).AllowFixing = DefaultableBoolean.False

        ' Specify how sorting affects the order of fixed rows. FixOrder keeps the
        ' fixed rows in the same order as they were fixed regardless of the sorting
        ' criteria.
        e.Layout.Override.FixedRowSortOrder = FixedRowSortOrder.FixOrder

        ' Appearance of the fixed row an be control using the FixedRowAppearance,
        ' FixedRowCellAppearance and FixedRowSelectorAppearance.
        e.Layout.Override.FixedRowAppearance.BackColor = Color.LightYellow
        e.Layout.Override.FixedRowCellAppearance.ForeColor = Color.Blue
        e.Layout.Override.FixedRowSelectorAppearance.BackColor = Color.Blue

        ' Display a separator between fixed rows and scrolling rows.
        ' SpecialRowSeparator property can be used to display separators between
        ' various 'special' rows, including between fixed and scrolling rows. This
        ' property is a flagged enum property so it can take multiple values.
        e.Layout.Override.SpecialRowSeparator = SpecialRowSeparator.FixedRows

        ' Appearance of the separator can be controlled using the 
        ' SpecialRowSeparatorAppearance property.
        e.Layout.Override.SpecialRowSeparatorAppearance.BackColor = Color.FromArgb(218, 217, 241)

        ' Height of the separator can be controlled as well using the 
        ' SpecialRowSeparatorHeight property.
        e.Layout.Override.SpecialRowSeparatorHeight = 6

        ' Border style of the separator can be controlled using the 
        ' BorderStyleSpecialRowSeparator property.
        e.Layout.Override.BorderStyleSpecialRowSeparator = UIElementBorderStyle.RaisedSoft

        ' FixedRowsLimit property can be used to specify a limit on how many rows 
        ' can be fixed. Default is 0 which means there is no limit.
        e.Layout.Override.FixedRowsLimit = 4

        ' Fix couple of rows. To fix a row simply add it to the FixedRows collection
        ' returned by the FixedRows property.
        e.Layout.Rows.FixedRows.Add(e.Layout.Rows(0))
        e.Layout.Rows.FixedRows.Add(e.Layout.Rows(1))

        ' Alternatively you can also fix rows by setting the Fixed property of the rows.
        ' This has the same affect as adding the row to its containing row collections
        ' FixedRows collection.
        e.Layout.Rows(2).Fixed = True

        ' You can also change the icons used in the fixed row indicators by setting
        ' the FixedRowOnImage and FixedRowOffImage.
        e.Layout.FixedRowOnImage = fixedImage
        e.Layout.FixedRowOffImage = unFixedImage
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void UltraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// Set the fixed row style to Top. This indicates where the fixed rows
			// are displayed.
			e.Layout.Override.FixedRowStyle = FixedRowStyle.Top;

			// Set the FixedRowIndicator to Button. This property can be set to None
			// to prevent the user from fixing or unfixing rows via the user interface.
			// Setting this to None will hide the indicators in the row selectors.
			e.Layout.Override.FixedRowIndicator = FixedRowIndicator.Button;

			// You can show or hide the fixed row indicator on an individual row using the
			// AllowFixing property of the row.
			e.Layout.Rows[0].AllowFixing = DefaultableBoolean.False;

			// Specify how sorting affects the order of fixed rows. FixOrder keeps the
			// fixed rows in the same order as they were fixed regardless of the sorting
			// criteria.
			e.Layout.Override.FixedRowSortOrder = FixedRowSortOrder.FixOrder;

			// Appearance of the fixed row an be control using the FixedRowAppearance,
			// FixedRowCellAppearance and FixedRowSelectorAppearance.
			e.Layout.Override.FixedRowAppearance.BackColor = Color.LightYellow;
			e.Layout.Override.FixedRowCellAppearance.ForeColor = Color.Blue;
			e.Layout.Override.FixedRowSelectorAppearance.BackColor = Color.Blue;

			// Display a separator between fixed rows and scrolling rows.
			// SpecialRowSeparator property can be used to display separators between
			// various 'special' rows, including between fixed and scrolling rows. This
			// property is a flagged enum property so it can take multiple values.
			e.Layout.Override.SpecialRowSeparator = SpecialRowSeparator.FixedRows;

			// Appearance of the separator can be controlled using the 
			// SpecialRowSeparatorAppearance property.
			e.Layout.Override.SpecialRowSeparatorAppearance.BackColor = Color.FromArgb( 218, 217, 241 );

			// Height of the separator can be controlled as well using the 
			// SpecialRowSeparatorHeight property.
			e.Layout.Override.SpecialRowSeparatorHeight = 6;

			// Border style of the separator can be controlled using the 
			// BorderStyleSpecialRowSeparator property.
			e.Layout.Override.BorderStyleSpecialRowSeparator = UIElementBorderStyle.RaisedSoft;

			// FixedRowsLimit property can be used to specify a limit on how many rows 
			// can be fixed. Default is 0 which means there is no limit.
			e.Layout.Override.FixedRowsLimit = 4;

			// Fix couple of rows. To fix a row simply add it to the FixedRows collection
			// returned by the FixedRows property.
			e.Layout.Rows.FixedRows.Add( e.Layout.Rows[0] );
			e.Layout.Rows.FixedRows.Add( e.Layout.Rows[1] );

			// Alternatively you can also fix rows by setting the Fixed property of the rows.
			// This has the same affect as adding the row to its containing row collections
			// FixedRows collection.
			e.Layout.Rows[2].Fixed = true;

			// You can also change the icons used in the fixed row indicators by setting
			// the FixedRowOnImage and FixedRowOffImage.
			e.Layout.FixedRowOnImage = fixedImage;
			e.Layout.FixedRowOffImage = unFixedImage;
		}
参照