Tab
A newer version of this page is available. Switch to the current version.

ASPxGridColumnDisplayTextEventArgs.VisibleIndex Property

Gets the visible index of the data item (row, card or record) where the processed cell resides.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public int VisibleIndex { get; }
Public ReadOnly Property VisibleIndex As Integer

Property Value

Type Description
Int32

An integer zero-based index that identifies the data item where the processed cell resides.

Remarks

Find control-specific information (for ASPxGridView, ASPxCardView or ASPxVerticalGrid) in the sections below.

ASPxGridView

When a grid is filtered or sorted by display text (the GridDataColumnSettings.FilterMode or the ASPxGridBehaviorSettings.SortMode property is set to DisplayText), it forces the ASPxGridView.CustomColumnDisplayText event to fire. Since visible row indexes are not defined while filtering or sorting, the VisibleIndex property returns negative one (-1). In this case, you cannot use the GetFieldValue(int visibleIndex, string fieldName) overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed row.

Grid View - Getting Started

ASPxCardView

When a grid is filtered or sorted by display text (the GridDataColumnSettings.FilterMode or the ASPxGridBehaviorSettings.SortMode property is set to DisplayText), it forces the ASPxCardView.CustomColumnDisplayText event to fire. Since visible card indexes are not defined while filtering or sorting, the VisibleIndex property returns negative one (-1). In this case, you cannot use the GetFieldValue(int visibleIndex, string fieldName) overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed row.

Card View - Getting Started

ASPxVerticalGrid

When a grid is filtered or sorted by display text (the GridDataColumnSettings.FilterMode or the ASPxGridBehaviorSettings.SortMode property is set to DisplayText), it forces the ASPxVerticalGrid.CustomRowDisplayText event to fire. Since visible records are not defined while filtering or sorting, the VisibleIndex property returns negative one (-1). In this case, you cannot use the GetFieldValue(int visibleIndex, string fieldName) overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed row.

Vertical Grid - Getting Started

See Also