C# Класс Rock.Web.UI.Controls.AttributeField

If DataItem implements IHasAttributes, this gets the Attribute value for the dataitem using DataField as the Attribute.Key. Otherwise, it will look in the grid.ObjectList[key] using the DataField as the lookup key. Example: If using a Person Grid, the value of the Attribute "FavoriteColor" would be shown in the grid by specifying this grid column <Rock:AttributeField DataField="FavoriteColor" HeaderText="Person's Favorite Color" />
Наследование: RockBoundField
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetExportValue ( System.Web.UI.WebControls.GridViewRow row ) : object

Gets the value that should be exported to Excel

Защищенные методы

Метод Описание
FormatDataValue ( object dataValue, bool encode ) : string

Formats the specified field value for a cell in the T:System.Web.UI.WebControls.BoundField object.

GetValue ( System controlContainer ) : object

Retrieves the value of the field bound to the T:System.Web.UI.WebControls.BoundField object.

Приватные методы

Метод Описание
GetAttributeObject ( System.Web.UI.WebControls.GridViewRow row ) : IHasAttributes

Gets the attribute object.

GetRowValue ( System.Web.UI.WebControls.GridViewRow row, bool condensed, bool formatAsHtml ) : object

Gets the row value.

Описание методов

FormatDataValue() защищенный Метод

Formats the specified field value for a cell in the T:System.Web.UI.WebControls.BoundField object.
protected FormatDataValue ( object dataValue, bool encode ) : string
dataValue object The field value to format.
encode bool true to encode the value; otherwise, false.
Результат string

GetExportValue() публичный Метод

Gets the value that should be exported to Excel
public GetExportValue ( System.Web.UI.WebControls.GridViewRow row ) : object
row System.Web.UI.WebControls.GridViewRow The row.
Результат object

GetValue() защищенный Метод

Retrieves the value of the field bound to the T:System.Web.UI.WebControls.BoundField object.
protected GetValue ( System controlContainer ) : object
controlContainer System The container for the field value.
Результат object