Class GridListFilterBarCellModel
Implements the DataModel part for a ExtendedTableFilterBar cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.GridHelperClasses
Assembly: Syncfusion.GridHelperClasses.Windows.dll
Syntax
public class GridListFilterBarCellModel : GridDropDownGridListControlCellModel, ISerializable, IDisposable
Constructors
GridListFilterBarCellModel(GridModel)
Initializes a new instance of the GridListFilterBarCellModel class. and stores a reference to the GridModel this cell belongs to.
Declaration
public GridListFilterBarCellModel(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.
GridListFilterBarCellModel(GridModel, Boolean)
Applies Filter to GridList.
Declaration
public GridListFilterBarCellModel(GridModel grid, bool filterOnlyOnCellLostFocus)
Parameters
Type | Name | Description |
---|---|---|
GridModel | grid | The GridModel. |
System.Boolean | filterOnlyOnCellLostFocus | Indicates whether filter only on cell focus has to be enabled. |
GridListFilterBarCellModel(GridModel, Boolean, Boolean)
Applies FilterBar cell to the Grid.
Declaration
public GridListFilterBarCellModel(GridModel grid, bool filterOnlyOnCellLostFocus, bool isCombobox)
Parameters
Type | Name | Description |
---|---|---|
GridModel | grid | The GridModel. |
System.Boolean | filterOnlyOnCellLostFocus | Indicates whether filter only on cell focus has to be enabled. |
System.Boolean | isCombobox | Indicates whether it is combo box. |
GridListFilterBarCellModel(GridModel, Boolean, Boolean, GridDynamicFilter)
Initializes a new instance of the GridListFilterBarCellModel class and stores a reference to the GridDynamicFilter belongs to this model.
Declaration
public GridListFilterBarCellModel(GridModel grid, bool filterOnlyOnCellLostFocus, bool isCombobox, GridDynamicFilter dynamicFilter)
Parameters
Type | Name | Description |
---|---|---|
GridModel | grid | The GridModel. |
System.Boolean | filterOnlyOnCellLostFocus | Indicates whether filter only on cell focus has to be enabled. |
System.Boolean | isCombobox | Indicates whether it is combo box. |
GridDynamicFilter | dynamicFilter | The GridDynamicFilter that determines the FilterDelay to filter the grid while typing in filterbar. |
GridListFilterBarCellModel(SerializationInfo, StreamingContext)
Initializes a new instance of the GridListFilterBarCellModel class from a serialization stream.
Declaration
protected GridListFilterBarCellModel(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or deserialize 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 | Description |
---|---|
System.Boolean | True If filter has to be applied on cell focus. Otherwise false. |
SelectAllText
Gets or sets select all text Default: (All)
Declaration
public string SelectAllText { get; set; }
Property Value
Type |
---|
System.String |
SelectCustomText
Gets or sets select custom text Default: (Custom...)
Declaration
public string SelectCustomText { get; set; }
Property Value
Type |
---|
System.String |
SelectEmptyText
Gets or sets 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 GridListFilterBarCellRenderer specific for a GridControlBase. |
Overrides
FillWithChoices(GridListControl, GridStyleInfo, out Boolean)
Creates choice list for the filter drop down.
Declaration
public void FillWithChoices(GridListControl listBox, GridStyleInfo style, out bool exclusive)
Parameters
Type | Name | Description |
---|---|---|
GridListControl | 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. |
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
GetDataSource(GridStyleInfo)
Gets the data source.
Declaration
public override object GetDataSource(GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfo | style | Cell style. |
Returns
Type | Description |
---|---|
System.Object | Data source object. |
Overrides
GetDisplayMember(GridTableCellStyleInfo, Object)
Gets the display member of the tablecell
Declaration
public object GetDisplayMember(GridTableCellStyleInfo style, object item)
Parameters
Type | Name | Description |
---|---|---|
GridTableCellStyleInfo | style | used for apperence of the table cell |
System.Object | item | used for stores the item |
Returns
Type | Description |
---|---|
System.Object | An object of the display member. |
GetFilterBarChoices(GridTableCellStyleInfoIdentity)
Returns the unique choices to be displayed in the filterbar 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)
Gets the compare operator image.
Declaration
protected object GetLogicalCompareOperator(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Cell style to identify the column name. |
Returns
Type | Description |
---|---|
System.Object | The compare operator image. |
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 | Selected index of the filter drop down. |
SelectCustomFilterBar(GridTableCellStyleInfoIdentity)
Initiates 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 items and applying filer.
Declaration
protected void SelectItem(GridTableCellStyleInfoIdentity tableCellIdentity, int index)
Parameters
Type | Name | Description |
---|---|---|
GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
System.Int32 | index | Index of the drop down list item. |
SelectItem(GridTableCellStyleInfoIdentity, Object, Object, Int32)
Selects the filter items and applying filer.
Declaration
protected void SelectItem(GridTableCellStyleInfoIdentity tableCellIdentity, object condition, object value, int index)
Parameters
Type | Name | Description |
---|---|---|
GridTableCellStyleInfoIdentity | tableCellIdentity | Cell identifier. |
System.Object | condition | Filter condition. |
System.Object | value | Filter criteria value. |
System.Int32 | index | Index of the drop down list 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 |