TLinqDataTable<T> Class
An implementation of a VirtualDataTable using IEnumerator and Linq. This class is abstract so to use it you should inherit from it and override the needed methods. In normal cases you won't need to override this class, as FlexCel already has an implementation of it that deals with IEnumerator tables. Inheriting from this class is only for very special cases.
Syntax
Namespace: FlexCel.Report
public abstract class TLinqDataTable<T>: VirtualDataTable, ILinqDataTable
Type Parameters
Type Parameter | Description |
---|---|
T | Type of the class which is used as base for this datatable. |
Constructors
Name | Description |
---|---|
TLinqDataTable | Overloaded TLinqDataTable(String, VirtualDataTable, IQueryable<T>) TLinqDataTable(String, VirtualDataTable, IQueryable<T>, TLinqDataTable<T>, String[]) |
Methods
Name | Description |
---|---|
CreateNewDataTable | Override this method when inheriting from this class to return the correct object. To do so, you will need to create a constructor in your class with parameters (aTableName, aCreator, aOrigTable, aFilters), call the inherited constructor in this class with the same parameters, and then in this method create a new instance of your class with the above constructor. |
FindOrigTableName | Original name of the table. This will be used in relationships. |
GetColumn | Returns a column identifier that you can later use on VirtualDataTableState.GetValue(Int32). Return -1 if the column does not exist, and make sure this search is case insensitive. |
GetColumnName | Returns the column name for a column identifier. This method is the reverse of VirtualDataTable.GetColumn |
GetColumnCaption | Returns the column caption for a column identifier. This method is used on generic dataset to write the header column. For most uses, VirtualDataTable.GetColumnName will be used. |
FilterData | This method should return a new VirtualDataTable instance with the data filtered. If RowFilter is null, this method should return a copy of the dataset with a different name. Note that you might have the same data with different states, so this method might be called more than once. |
GetDetail | Override this method if the table has linked tables that you can use for master detail relationships instead of normal relationships. This is the case for example in Entity Framework. |
HasDetail | Returns true if the database has a linked datatable with name dataTableName. |
GetRelationWith | Override this method if the datatable has intrinsic relationships that you want to use. For example DataSets have DataRelationships, or Entity Framework tables are related as properties from the master to the detail. All those relationships that are not explicitly defined in the report should be returned here. |
GetDistinct | Override this method to return a new VirtualDataSet with unique values. Note that the returned dataset will not have all the columns this one has, only the ones defined on "filterFields" |
Dispose | Override this method on derived classes. |
Properties
Name | Description |
---|---|
Data | Data on this table. It might be null, if this table is linked to another. |
Filters | An array of filter strings that must be applied to this dataset. |
Fields | Field definitions. |
Locale | Locale for this dataset. This might be needed to create datatables with data and the same locale. |
ColumnCount | Returns the number of columns of the table. |