C# Class 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" />
Inheritance: RockBoundField
Afficher le fichier Open project: NewSpring/Rock Class Usage Examples

Méthodes publiques

Méthode Description
GetExportValue ( System.Web.UI.WebControls.GridViewRow row ) : object

Gets the value that should be exported to Excel

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

FormatDataValue() protected méthode

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.
Résultat string

GetExportValue() public méthode

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.
Résultat object

GetValue() protected méthode

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.
Résultat object