'Declaration Public Enum FixedFieldLocation Inherits System.Enum
public enum FixedFieldLocation : System.Enum
Member | Description |
---|---|
FixedToFarEdge | The field is fixed and does not scroll. In a horizontal layout, the field elements will be positioned at the bottom and in a vertical layout, the field elements will be positioned on the right. |
FixedToNearEdge | The field is fixed and does not scroll. In a horizontal layout, the field elements will be positioned at the top and in a vertical layout, the field elements will be positioned on the left. |
Scrollable | The field is not fixed and will move as the scrollbar is moved. |
Imports Infragistics.Windows.DataPresenter Private Sub InitializeDP(ByVal dp As DataPresenterBase) ' FixedFieldUIType determine the elements that are displayed in the ui ' that the end user may use to change the state of the fixedlocation ' of the fields that allow fixing dp.FieldLayoutSettings.FixedFieldUIType = FixedFieldUIType.ButtonAndSplitter ' AllowFixing determines whether the fixed state may be changed by the ' user. note, even if fixedfielduitype is none the fixed state could ' be changed by dragging a field into or out of a fixed area dp.FieldSettings.AllowFixing = AllowFieldFixing.NearOrFar ' just use sample data for the demo dp.BindToSampleData = True Dim fl As FieldLayout = New FieldLayout() ' the following field should start off as fixed to the near edge. since ' we have enabled fixing, its fixed state can be changed by the end user Dim fldName As Field = New Field() fldName.Name = "name" fldName.FixedLocation = FixedFieldLocation.FixedToNearEdge fl.Fields.Add(fldName) ' the following field should start off as fixed to the far edge but ' using the AllowFixing for this field's settings we can prevent the ' end user from being able to change its state Dim fldDept As Field = New Field() fldDept.Name = "department" fldDept.FixedLocation = FixedFieldLocation.FixedToFarEdge fldDept.Settings.AllowFixing = AllowFieldFixing.No fl.Fields.Add(fldDept) dp.FieldLayouts.Add(fl) End Sub
using Infragistics.Windows.DataPresenter; private void InitializeDP(DataPresenterBase dp) { // FixedFieldUIType determine the elements that are displayed in the ui // that the end user may use to change the state of the fixedlocation // of the fields that allow fixing dp.FieldLayoutSettings.FixedFieldUIType = FixedFieldUIType.ButtonAndSplitter; // AllowFixing determines whether the fixed state may be changed by the // user. note, even if fixedfielduitype is none the fixed state could // be changed by dragging a field into or out of a fixed area dp.FieldSettings.AllowFixing = AllowFieldFixing.NearOrFar; // just use sample data for the demo dp.BindToSampleData = true; FieldLayout fl = new FieldLayout(); // the following field should start off as fixed to the near edge. since // we have enabled fixing, its fixed state can be changed by the end user Field fldName = new Field(); fldName.Name = "name"; fldName.FixedLocation = FixedFieldLocation.FixedToNearEdge; fl.Fields.Add(fldName); // the following field should start off as fixed to the far edge but // using the AllowFixing for this field's settings we can prevent the // end user from being able to change its state Field fldDept = new Field(); fldDept.Name = "department"; fldDept.FixedLocation = FixedFieldLocation.FixedToFarEdge; fldDept.Settings.AllowFixing = AllowFieldFixing.No; fl.Fields.Add(fldDept); dp.FieldLayouts.Add(fl); }
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