'宣言 Public Enum FixedRecordSortOrder Inherits System.Enum
public enum FixedRecordSortOrder : System.Enum
メンバ | 解説 |
---|---|
Default | デフォルトでは Sorted に解決します。 |
FixOrder | 並べ替え列が変更された後も、固定レコードの順序は固定したときと同じ順序に維持されます。FixedRowsCollectionのRefreshSortメソッドを呼び出すと、並べ替えたレコードに基づいて固定レコードが並べ替え直されます。 |
Sorted | ユーザーがフィールドを並べ替えたときに固定レコードが並べ替えられます。ただし、ユーザーがレコードを固定したとき、そのレコードは常に固定レコードの最後に追加されます。正しい並べ替え位置に挿入するには、DataPresenterBase.RecordFixedLocationChanged イベント ハンドラーのレコードの Record.RefreshSortPosition メソッドを呼び出します。 |
Dim settings As FieldLayoutSettings = Me.xamDataGrid2.FieldLayoutSettings ' Allow fixing to the top or bottom of the display ' ' Note: fixing to the bottom is only supported at the root level so ' any child records or records inside groups can only be ' fixed to the top settings.AllowRecordFixing = AllowRecordFixing.TopOrBottom ' Specify a limit to the number of records that can be fixed. ' Once the limit has been reached the record that was fixed first ' will be bumped off the fixed list when a new record is fixed (FIFO). ' ' Note: This limit applies independently to the top and bottom so ' that in Me case there could be up to 3 records fixed to ' the top and 3 records fixed to the bottom at the same time. settings.FixedRecordLimit = 3 ' By setting FixedRecordSortOrder to 'FixOrder' the records will ' be ordered such that the record that was fixed last will be ' closest to the scrollable records i.e. the last record fixed to ' the top will be at the bottom of the top fixed records. The order ' is reversed for bottom fixed records. ' ' Note: This order is maintained until the user performs a sort ' operation or the RefreshSort methd is called. settings.FixedRecordSortOrder = FixedRecordSortOrder.FixOrder ' Setting FixedRecordUIType to 'Button' will display a FixedRecordButton ' in the RecordSelector of a DataRecord settings.FixedRecordUIType = FixedRecordUIType.Button
FieldLayoutSettings settings = this.xamDataGrid2.FieldLayoutSettings; // Allow fixing to the top or bottom of the display // // Note: fixing to the bottom is only supported at the root level so // any child records or records inside groups can only be // fixed to the top settings.AllowRecordFixing = AllowRecordFixing.TopOrBottom; // Specify a limit to the number of records that can be fixed. // Once the limit has been reached the record that was fixed first // will be bumped off the fixed list when a new record is fixed (FIFO). // // Note: This limit applies independently to the top and bottom so // that in this case there could be up to 3 records fixed to // the top and 3 records fixed to the bottom at the same time. settings.FixedRecordLimit = 3; // By setting FixedRecordSortOrder to 'FixOrder' the records will // be ordered such that the record that was fixed last will be // closest to the scrollable records i.e. the last record fixed to // the top will be at the bottom of the top fixed records. The order // is reversed for bottom fixed records. // // Note: This order is maintained until the user performs a sort // operation or the RefreshSort methd is called. settings.FixedRecordSortOrder = FixedRecordSortOrder.FixOrder; // Setting FixedRecordUIType to 'Button' will display a FixedRecordButton // in the RecordSelector of a DataRecord settings.FixedRecordUIType = FixedRecordUIType.Button;