CardView.FocusedCardTopFieldIndex Property
Gets or sets the index of the top visible field within the focused card.
Namespace: DevExpress.XtraGrid.Views.Card
Assembly: DevExpress.XtraGrid.v20.1.dll
NuGet Package: DevExpress.Win.Grid
Declaration
[Browsable(false)]
[DefaultValue(0)]
public virtual int FocusedCardTopFieldIndex { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Int32 | 0 | An integer value specifying the zero-based index of the focused card’s top visible field. |
Remarks
If cards do not fit into the View vertically, their contents are only partially displayed . Unfocused cards always display their top fields in such a case. The focused card can be scrolled via code using the FocusedCardTopFieldIndex property. Assigning a value to this property results in scrolling the card vertically so that the field with the specified index becomes the top visible (if possible). Assigning negative values results in scrolling the card to the top. Assigning values greater than the last available index, scrolls the card to the last field.
Note: the FocusedCardTopFieldIndex property specifies the field by its visible index (the GridColumn.VisibleIndex property value).
End-users can also scroll cards. Card scroll buttons serve for this purpose. The availability of these buttons is controlled by the View’s CardView.VertScrollVisibility property.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the FocusedCardTopFieldIndex member must not be invoked for these Views. The FocusedCardTopFieldIndex member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.
- GridControl.MainView - returns the top most View in a grid;
- GridControl.FocusedView - returns the focused View;
- GridControl.DefaultView - returns the currently maximized View;
- the sender parameter of View specific events;
- GridView.GetDetailView - returns a detail clone View for a specific master row.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FocusedCardTopFieldIndex property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.