Version

FixedRecordLocation Enumeration

Indicates whether a Record is fixed and if so to which edge.
Syntax
'Declaration
 
Public Enum FixedRecordLocation 
   Inherits System.Enum
public enum FixedRecordLocation : System.Enum 
Members
MemberDescription
FixedToBottomThe record is fixed on bottom and does not scroll.
FixedToTopThe record is fixed on top and does not scroll.
ScrollableThe record is not fixed and will move as the scrollbar is moved.
Example
The following code sets the FixedLocation of the active DataRecord to be fixed on top.

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;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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