バージョン

FixedRecordLocation 列挙体

Record が固定されているかどうか、またその場合は、どのエッジに固定されているかを示します。
シンタックス
'宣言
 
Public Enum FixedRecordLocation 
   Inherits System.Enum
public enum FixedRecordLocation : System.Enum 
メンバ
メンバ解説
FixedToBottomレコードは下端に固定されて、スクロールできません。
FixedToTopレコードは上端に固定されて、スクロールできません。
Scrollableレコードは固定されていません。スクロールバーが移動すると、フィールドも移動します。
使用例
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)

    ' If the current active record is a DataRecord then
    ' fix the record to the top of the display.

    ' Note: it is possible to fix other types of records (e.g. GroupByRecords)
    '       However, usually DataRecorcds are the only types of records to be
    '       fixed. In fact we don't provide a UI to fix anything but DataRecords
    If TypeOf Me.xamDataGrid1.ActiveRecord Is DataRecord Then

        Dim activeRecord As DataRecord = CType(Me.xamDataGrid1.ActiveRecord, DataRecord)

        ' Check to make sure that the record is not a special record 
        ' (e.g. a FilterRecord or an 'Add' record)

        If Not activeRecord.IsSpecialRecord Then
            activeRecord.FixedLocation = FixedRecordLocation.FixedToTop
        End If
    End If

End Sub
private void Button_Click(object sender, RoutedEventArgs e)
{
    // If the current active record is a DataRecord then
    // fix the record to the top of the display.

    // Note: it is possible to fix other types of records (e.g. GroupByRecords)
    //       However, usually DataRecorcds are the only types of records to be
    //       fixed. In fact we don't provide a UI to fix anything but DataRecords
    DataRecord activeRecord = this.xamDataGrid1.ActiveRecord as DataRecord;

    // Check to make sure that the record is not a special record 
    // (e.g. a FilterRecord or an 'Add' record)
    if (activeRecord != null && !activeRecord.IsSpecialRecord)
        activeRecord.FixedLocation = FixedRecordLocation.FixedToTop;

}
参照