Class GridTableFilterBarExtCellModel
Implements the cell data model part for a ExtendedTableFilterBar cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.GridHelperClasses
Assembly: Syncfusion.GridHelperClasses.Windows.dll
Syntax
public class GridTableFilterBarExtCellModel : GridComboBoxCellModel, ISerializable, IDisposable
Constructors
GridTableFilterBarExtCellModel(GridModel)
Initializes a new instance of the GridTableFilterBarExtCellModel class. and stores a reference to the GridModel this cell belongs to.
Declaration
public GridTableFilterBarExtCellModel(GridModel grid)
Parameters
| Type | Name | Description |
|---|---|---|
| GridModel | grid | The GridModel for this cell model. |
Remarks
You typically access cell models through the CellModels property of the GridModel class.
GridTableFilterBarExtCellModel(GridModel, Boolean)
Initializes a new instance of the GridTableFilterBarExtCellModel class.
Declaration
public GridTableFilterBarExtCellModel(GridModel grid, bool filterOnlyOnCellLostFocus)
Parameters
| Type | Name | Description |
|---|---|---|
| GridModel | grid | The grid model to wire the cell. |
| System.Boolean | filterOnlyOnCellLostFocus | Indicates whether filter only on cell lost focus has to be enabled. |
GridTableFilterBarExtCellModel(GridModel, Boolean, GridDynamicFilter)
Initializes a new instance of the GridTableFilterBarExtCellModel class and stores a reference to the GridDynamicFilter belongs to this model.
Declaration
public GridTableFilterBarExtCellModel(GridModel grid, bool filterOnlyOnCellLostFocus, GridDynamicFilter dynamicFilter)
Parameters
| Type | Name | Description |
|---|---|---|
| GridModel | grid | The grid model to wire the cell. |
| System.Boolean | filterOnlyOnCellLostFocus | Indicates whether filter only on cell lost focus has to be enabled. |
| GridDynamicFilter | dynamicFilter | The GridDynamicFilter that determines the FilterDelay to filter the grid while typing in filterbar. |
GridTableFilterBarExtCellModel(SerializationInfo, StreamingContext)
Initializes a new GridTableFilterBarExtCellModel from a serialization stream.
Declaration
protected GridTableFilterBarExtCellModel(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or de-serialize this instance. |
| System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Properties
ApplyFilterOnlyOnCellLostFocus
Gets or sets a value indicating whether filter should be applied on cell lost focus.
Declaration
public bool ApplyFilterOnlyOnCellLostFocus { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
SelectAllText
Gets or sets a select all text Default: (All)
Declaration
public string SelectAllText { get; set; }
Property Value
| Type |
|---|
| System.String |
SelectCustomText
Gets or sets a select custom text Default: (Custom...)
Declaration
public string SelectCustomText { get; set; }
Property Value
| Type |
|---|
| System.String |
SelectEmptyText
Gets or sets a select empty text Default: (Empty)
Declaration
public string SelectEmptyText { get; set; }
Property Value
| Type |
|---|
| System.String |
Methods
ApplyFilters()
Applies filters to grid.
Declaration
public void ApplyFilters()
CreateRenderer(GridControlBase)
Creates a GridTableFilterBarExtCellRenderer for this cell model that is specific to the GridControlBase.
Declaration
public override GridCellRendererBase CreateRenderer(GridControlBase control)
Parameters
| Type | Name | Description |
|---|---|---|
| GridControlBase | control | The GridControlBase the cell renderer is created for. |
Returns
| Type | Description |
|---|---|
| GridCellRendererBase | A new GridTableFilterBarExtCellRenderer specific for a GridControlBase. |
Overrides
FillWithChoices(ListBox, GridStyleInfo, out Boolean)
Creates choice list for the filter drop down.
Declaration
public override void FillWithChoices(ListBox listBox, GridStyleInfo style, out bool exclusive)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.ListBox | listBox | Drop down list box. |
| GridStyleInfo | style | Cell style information. |
| System.Boolean | exclusive | Indicates whether the list box is loaded with exclusive choice list or if non-standard values are allowed. |
Overrides
GetFilterBarChoices(GridTableCellStyleInfoIdentity)
Returns the unique choices to be displayed in the filter bar cell.
Declaration
public virtual object[] GetFilterBarChoices(GridTableCellStyleInfoIdentity tableCellIdentity)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | Table cell identifier. |
Returns
| Type | Description |
|---|---|
| System.Object[] | Filter bar choices. |
GetLogicalCompareOperator(String)
A method that returns logical compare operator.
Declaration
protected virtual object GetLogicalCompareOperator(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | Column Name |
Returns
| Type | Description |
|---|---|
| System.Object | A FilterCompareOperator. |
GetRecordFilter(RecordFilterDescriptorCollection, GridTableCellStyleInfoIdentity, String)
Returns the desired filter from a list available filters.
Declaration
public RecordFilterDescriptor GetRecordFilter(RecordFilterDescriptorCollection recordFilters, GridTableCellStyleInfoIdentity tableCellIdentity, string filterName)
Parameters
| Type | Name | Description |
|---|---|---|
| RecordFilterDescriptorCollection | recordFilters | A list of available record filters. |
| GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
| System.String | filterName | Name of the filter. |
Returns
| Type | Description |
|---|---|
| RecordFilterDescriptor | Record filter. |
GetUniqueColumnGroupId(GridTableCellStyleInfoIdentity)
Returns the category for a given cell.
Declaration
public string GetUniqueColumnGroupId(GridTableCellStyleInfoIdentity tableCellIdentity)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
Returns
| Type | Description |
|---|---|
| System.String | Category key. |
GetUniqueGroupId(GridTableCellStyleInfoIdentity)
Returns an array of category keys for this group and all parent groups which is used by FilterBarCells and FitlerBarSummary to compare whether the conditions should be applied to this group.
Declaration
public object[] GetUniqueGroupId(GridTableCellStyleInfoIdentity tableCellIdentity)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
Returns
| Type | Description |
|---|---|
| System.Object[] | An array of category keys. |
HasFilter(GridTableCellStyleInfoIdentity)
Determines whether the given cell has a filter.
Declaration
public bool HasFilter(GridTableCellStyleInfoIdentity tableCellIdentity)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | The table cell identity. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if it has a filter; False otherwise. |
Select(GridTableCellStyleInfoIdentity, Int32)
Applies a filter criteria. Note: The first two entries are reserved for (All) and (Custom). An index greater than one represents a valid choice found with GetFilterBarChoices.
Declaration
public void Select(GridTableCellStyleInfoIdentity tableCellIdentity, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
| System.Int32 | index | Filter choice index. |
SelectCustomFilterBar(GridTableCellStyleInfoIdentity)
Initiates the collection dialog editor while selecting custom option.
Declaration
protected void SelectCustomFilterBar(GridTableCellStyleInfoIdentity tableCellIdentity)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | cell identifier |
SelectItem(GridTableCellStyleInfoIdentity, Int32)
Selects the filter bar item.
Declaration
protected void SelectItem(GridTableCellStyleInfoIdentity tableCellIdentity, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | |
| System.Int32 | index | Index of the selected item. |
SelectItem(GridTableCellStyleInfoIdentity, Object, Object, Int32)
Selects the filter bar item to perform filtering.
Declaration
protected void SelectItem(GridTableCellStyleInfoIdentity tableCellIdentity, object condition, object value, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| GridTableCellStyleInfoIdentity | tableCellIdentity | A cell identity. |
| System.Object | condition | Filter condition. |
| System.Object | value | Selected item value. |
| System.Int32 | index | Index of the selected item. |
ShowCollectionDialog(Object, String, IServiceProvider, Type)
Initializes the collection dialog.
Declaration
protected DialogResult ShowCollectionDialog(object instance, string propertyName, IServiceProvider provider, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | instance | Table descriptor. |
| System.String | propertyName | Name of the property. |
| System.IServiceProvider | provider | Service provider. |
| System.Type | type | Type of RecordFilterDescriptorCollection. |
Returns
| Type | Description |
|---|---|
| System.Windows.Forms.DialogResult | Return value of the dialog box. |
Events
CreateCompareOperatorList
Occurs when the filter button is clicked to show a drop down list of supported compare operators.
Declaration
public event CreateCompareOperatorListHandler CreateCompareOperatorList
Event Type
| Type |
|---|
| CreateCompareOperatorListHandler |
ShowingCustomFilterDialog
Occurs immediately before the RecordFilterCollectionEditor Dialog is displayed. The ControlEventArgs.Control the form.
Declaration
public event ControlEventHandler ShowingCustomFilterDialog
Event Type
| Type |
|---|
| System.Windows.Forms.ControlEventHandler |