'Declaration Public Enum FixedRecordLocation Inherits System.Enum
public enum FixedRecordLocation : System.Enum
Member | Description |
---|---|
FixedToBottom | The record is fixed on bottom and does not scroll. |
FixedToTop | The record is fixed on top and does not scroll. |
Scrollable | The record is not fixed and will move as the scrollbar is moved. |
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; }
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