Class GridTableFilterBarCellRenderer
Implements the renderer part of a TableFilterBar cell.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridTableFilterBarCellRenderer : GridComboBoxCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
GridTableFilterBarCellRenderer can be customized with DataSource, ValueMember, and DisplayMember properties of a GridStyleInfo instance.
If you do not have a data source object, you can also fill the drop-down list contents with a ChoiceList and optionally specify ExclusiveChoiceList.
The TableFilterBar cell is XP Themes enabled. It will be drawn themed if ThemesEnabled is True.
There can be several renderers. associated with one GridTableFilterBarCellModel if several views display the same GridModel.
Use "TableFilterBar" as identifier in CellType of a cell's GridStyleInfo to associate this cell type with a cell.
The cell's behavior and appearance can be customized with the following properties of the GridStyleInfo class.
Constructors
GridTableFilterBarCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the GridTableFilterBarCellRenderer class for the given instances of the GridControlBase and GridCellModelBase classes.
Declaration
public GridTableFilterBarCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase that displays this cell renderer. |
GridCellModelBase | cellModel | The GridTableFilterBarCellModel that holds data for this cell renderer that should be shared among views. |
Remarks
References to GridControlBase and GridCellModelBase will be saved.
Properties
ControlText
Gets or sets the value to be specified to the active text that is being displayed on the cell.
Declaration
public override string ControlText { get; set; }
Property Value
Type |
---|
System.String |
Overrides
Grid
Gets a value for reference to the parent grid.
Declaration
public GridTableControl Grid { get; }
Property Value
Type |
---|
GridTableControl |
Model
Gets a value for reference to the filterbar cell model.
Declaration
public GridTableFilterBarCellModel Model { get; }
Property Value
Type |
---|
GridTableFilterBarCellModel |
Methods
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Overrides and triggered when the drop down is about to be shown.
Declaration
public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
System.ComponentModel.CancelEventArgs | e | The System.ComponentModel.CancelEventArgs contains the event data. |
Overrides
GetFilterBarText(GridStyleInfo)
Gets the text from record filter criteria that should be displayed in filter bar cell.
Declaration
public string GetFilterBarText(GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfo | style | An instance of the GridStyleInfo that holds the values of style properties. |
Returns
Type | Description |
---|---|
System.String | The filtered item's text value. |
ListBoxMouseUp(Object, MouseEventArgs)
Overrides and triggered when the System.Windows.Forms.Control.MouseUp event is done in the list box.
Declaration
protected override void ListBoxMouseUp(object sender, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs contains the event data. |
Overrides
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overrides and draws the of the client bounds for the cell.
Declaration
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The instance of the System.Drawing.Graphics class. |
System.Drawing.Rectangle | clientRectangle | Specifies the client rectangle. It is the cell rectangle without buttons and borders. |
System.Int32 | rowIndex | Specifies the row index. |
System.Int32 | colIndex | Specifies the column index. |
GridStyleInfo | style | An instance of the GridStyleInfo that holds the values of style properties. |
Overrides
OnInitialize(Int32, Int32)
Overrides and initializes the current cell.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Row index for the current cell. |
System.Int32 | colIndex | Column index for the current cell. |
Overrides
OnKeyDown(KeyEventArgs)
Overrides and triggered when user pressed key down.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | e | The System.Windows.Forms.KeyEventArgs contains the event data. |
Overrides
OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)
Overrides and triggered for custom formatting of a cell by changing its style object.
Declaration
public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GridPrepareViewStyleInfoEventArgs | e | The GridPrepareViewStyleInfoEventArgs contains the event data. |