Class GridTableFilterBarGridListCellRenderer
Implements the renderer part of the filterbar cell.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridTableFilterBarGridListCellRenderer : GridDropDownGridListControlCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
GridTableFilterBarGridListCellRenderer can be customized with DataSource, ValueMember, and DisplayMember properties of a GridStyleInfo instance.
If you do not have a datasource 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 GridTableFilterBarGridListCellModel 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
GridTableFilterBarGridListCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the GridTableFilterBarGridListCellRenderer class for the given instance of the GridControlBase and GridCellModelBase classes.
Declaration
public GridTableFilterBarGridListCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase that displays this cell renderer. |
GridCellModelBase | cellModel | The GridCellModelBase that holds data for this cell renderer that should be shared among views. |
Remarks
References to GridControlBase and GridCellModelBase classes will be saved.
Properties
ControlText
Gets or sets the value of the active text that should be displayed on the cell.
Declaration
public override string ControlText { get; set; }
Property Value
Type |
---|
System.String |
Overrides
Grid
Gets a value of reference to the parent grid.
Declaration
public GridTableControl Grid { get; }
Property Value
Type |
---|
GridTableControl |
Model
Gets a value of reference to the cell model.
Declaration
public GridTableFilterBarGridListCellModel Model { get; }
Property Value
Type |
---|
GridTableFilterBarGridListCellModel |
Methods
GetFilterBarText(GridStyleInfo)
Gets the text value of the selected item to be displayed in the filterbar 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 | Filter bar text. |
ListControlGridPrepareViewStyleInfo(Object, GridPrepareViewStyleInfoEventArgs)
Overrides and initiates the style information for drop down table.
Declaration
protected override void ListControlGridPrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
GridPrepareViewStyleInfoEventArgs | e | The GridPrepareViewStyleInfoEventArgs contains the event data. |
Overrides
ListControlMouseUp(Object, MouseEventArgs)
Overrides and raises the System.Windows.Forms.Control.MouseUp event of the list box.
Declaration
public override void ListControlMouseUp(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
OnBeginEdit()
Overrides and performs the BeginEdit() method.
Declaration
protected override void OnBeginEdit()
Overrides
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overrides and draws the contents 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 | Points to the device context. |
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
OnDrawCellButton(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)
Overrides and draws the cell buttons.
Declaration
protected override void OnDrawCellButton(GridCellButton button, Graphics g, int rowIndex, int colIndex, bool bActive, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridCellButton | button | The cell button. |
System.Drawing.Graphics | g | The instance of the System.Drawing.Graphics class. |
System.Int32 | rowIndex | Row index. |
System.Int32 | colIndex | Column index. |
System.Boolean | bActive | If True draws the active cell button; Otherwise False. |
GridStyleInfo | style | An instance of the GridStyleInfo that holds the values of style properties. |
Overrides
OnInitialize(Int32, Int32)
Initialize the instance of the GridListControl class.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | RowIndex of the FilterBarCell. |
System.Int32 | colIndex | ColumnIndex of the FilterBarCell. |
Overrides
OnKeyDown(KeyEventArgs)
Occur this event while pressing the key on filter bar cell.
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 allows 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. |