Tab

ASPxGridColumnDisplayTextEventArgs.GetFieldValue(Int32, String) Method

Returns the value of the specified data source field in the specified data item (row, card or record).

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public object GetFieldValue(
    int visibleIndex,
    string fieldName
)
Public Function GetFieldValue(
    visibleIndex As Integer,
    fieldName As String
) As Object

Parameters

Name Type Description
visibleIndex Int32

A zero-based integer index that identifies the data item (row, card or record).

fieldName String

A String value that specifies the name of the data source field.

Returns

Type Description
Object

An object that is the value of the specified data source field.

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, you cannot use the current overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed row.

To determine that the event was initiated by filtering or sorting, use the ASPxGridColumnDisplayTextEventArgs.VisibleIndex property, which in this case, returns negative one (-1).

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, you cannot use the current overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed card.

To determine that the event was initiated by filtering or sorting, use the ASPxGridColumnDisplayTextEventArgs.VisibleIndex property, which in this case, returns negative one (-1).

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, you cannot use the current overload of the ASPxGridColumnDisplayTextEventArgs.GetFieldValue method to get a value of the non-processed record.

To determine that the event was initiated by filtering or sorting, use the ASPxGridColumnDisplayTextEventArgs.VisibleIndex property, which in this case, returns negative one (-1).

Vertical Grid - Getting Started

See Also