C# Class ZForge.Controls.XPTable.Models.DataSourceColumnBinder

Binder that creates the appropriate type of Column for a given column in a DataSource.
Datei anzeigen Open project: zhuangyy/Motion Class Usage Examples

Public Methods

Method Description
DataSourceColumnBinder ( ) : System

Creates a DataSourceColumnBinder with default values.

GetCell ( Column column, object val ) : Cell

Returns the cell to add to a row for the given value, depending on the type of column it will be shown in. If the column is a TextColumn then just the Text property is set. For all other column types just the Data value is set.

GetColumn ( PropertyDescriptor prop, int index ) : Column

Returns the type of column that is appropriate for the given property of the data source. Numbers, DateTime, Color and Boolean columns are mapped to NumberColumn, DateTimeColumn, ColorColumn and CheckBoxColumn respectively. The default is just a TextColumn.

Method Details

DataSourceColumnBinder() public method

Creates a DataSourceColumnBinder with default values.
public DataSourceColumnBinder ( ) : System
return System

GetCell() public method

Returns the cell to add to a row for the given value, depending on the type of column it will be shown in. If the column is a TextColumn then just the Text property is set. For all other column types just the Data value is set.
public GetCell ( Column column, object val ) : Cell
column Column
val object
return Cell

GetColumn() public method

Returns the type of column that is appropriate for the given property of the data source. Numbers, DateTime, Color and Boolean columns are mapped to NumberColumn, DateTimeColumn, ColorColumn and CheckBoxColumn respectively. The default is just a TextColumn.
public GetColumn ( PropertyDescriptor prop, int index ) : Column
prop System.ComponentModel.PropertyDescriptor
index int
return Column