Class FilterRowCellRenderer<E>
Represents a class that used to draw the filter row cell.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.RowFilter
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public abstract class FilterRowCellRenderer<E> : GridVirtualizingCellRendererBase<E>, IGridCellRenderer<TableControl>, IDisposable, IFilterRowRenderer where E : Control, new()
Type Parameters
Name | Description |
---|---|
E | Represents the System.Windows.Forms.Control |
Constructors
FilterRowCellRenderer()
Initializes a new instance of the FilterRowCellRenderer<E> class.
Declaration
public FilterRowCellRenderer()
Properties
DataColumn
Gets the data column base for the given column.
Declaration
public DataColumnBase DataColumn { get; }
Property Value
Type |
---|
DataColumnBase |
FilterOptionPopup
Gets or sets the pop-up control which contains the FilterOptionsList.
Declaration
protected ToolStripDropDown FilterOptionPopup { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ToolStripDropDown |
FilterOptionsList
Gets or sets the ListBox control to load the FilterType list.
Declaration
protected SfListView FilterOptionsList { get; set; }
Property Value
Type |
---|
SfListView |
IsDroppedDown
Gets a value indicating whether the filter options is dropped down or not.
Declaration
public bool IsDroppedDown { get; }
Property Value
Type |
---|
System.Boolean |
IsValueChanged
Gets or sets a value indicating whether the value is changed in the filter row cell or not.
Declaration
protected bool IsValueChanged { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
ApplyFilters(List<FilterPredicate>, String)
Apply the filter to the corresponding column with given FilterPredicates.
Declaration
protected void ApplyFilters(List<FilterPredicate> filterPredicates, string filterText)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<FilterPredicate> | filterPredicates | The list of FilterPredicate that want to be apply in a particular column. |
System.String | filterText | The text that want to displayed in FilterRowCell of a particular column. |
CloseFilterOptionPopup()
Closes the drop down of the filter options pop up.
Declaration
public virtual void CloseFilterOptionPopup()
Dispose(Boolean)
Overridden to dispose the events of the FilterRow cell renderer.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Indicates the call is from Dispose method. |
Overrides
DrawDropDownButton(Graphics, Rectangle, Color)
Draws the DropDown button for the filter row cell renderer.
Declaration
protected virtual void DrawDropDownButton(Graphics g, Rectangle rect, Color backColor)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The System.Drawing.Graphics that used to draw the filter icon. |
System.Drawing.Rectangle | rect | The rectangle region that needs to draw the drop down icon. |
System.Drawing.Color | backColor | The back color of the drop down button. |
GetCellValue()
Gets the cell value of the current cell.
Declaration
protected override string GetCellValue()
Returns
Type | Description |
---|---|
System.String | Returns the cell value of the current cell. |
Overrides
GetControlValue()
Gets the control value for the filter row cell renderer.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Returns the value of the cell. |
Overrides
GetEditorUIElementBounds()
Gets the bounds for the editor control.
Declaration
protected override Rectangle GetEditorUIElementBounds()
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | Returns the bound rectangle for the editor control. |
Overrides
GetFilterOptionsList()
Gets the list of filter options based on the FilterRowEditorType of the column.
Declaration
protected ObservableCollection<string> GetFilterOptionsList()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<System.String> | Returns the collection of filter options that are applicable for the column. |
GetFilterPredicates(Object)
Gets the list of FilterPredicates for the corresponding column.
Declaration
protected List<FilterPredicate> GetFilterPredicates(object filterValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | filterValue | The value that needs to be filter in corresponding column. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<FilterPredicate> | Returns the list of FilterPredicates that have been generated for the particular column. |
GetFilterText(List<FilterPredicate>)
Gets the FilterText that want to be displayed in particular FilterRow Cell.
Declaration
public virtual string GetFilterText(List<FilterPredicate> filterPredicates)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<FilterPredicate> | filterPredicates | The list of FilterPredicates that have been created to the particular column. |
Returns
Type | Description |
---|---|
System.String | Returns the filter text for the given filter predicate. |
GetMultiSelectFilterPredicates(List<FilterElement>, List<FilterElement>)
Gets the list of FilterPredicates for the corresponding column.
Declaration
protected List<FilterPredicate> GetMultiSelectFilterPredicates(List<FilterElement> filterValues, List<FilterElement> totalItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<FilterElement> | filterValues | The list of values that want to be filter in the particular column. |
System.Collections.Generic.List<FilterElement> | totalItems | The list of items which is loaded in ComboBox control. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<FilterPredicate> | Returns the list of FilterPredicates that have been generated for the particular column. |
OnFilterOptionsClick(Object, EventArgs)
Occurs when the selected index is changed for the FilterRowOptions list.
Declaration
protected virtual void OnFilterOptionsClick(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The object of the sender. |
System.EventArgs | e | An System.EventArgs that contains event data. |
OnFilterOptionsListMouseMove(Object, MouseEventArgs)
Occurs when the mouse move is done at the filter options list box.
Declaration
protected virtual void OnFilterOptionsListMouseMove(object sender, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The object of the sender. |
System.Windows.Forms.MouseEventArgs | e | An System.Windows.Forms.MouseEventArgs that contains event data. |
OnFilterRowConditionChanged(String)
Occurs when the FilterRowCondition is changed for the GridColumn.
Declaration
public virtual void OnFilterRowConditionChanged(string filterRowCondition)
Parameters
Type | Name | Description |
---|---|---|
System.String | filterRowCondition | The filter condition that has been changed. |
OnKeyPress(DataColumnBase, RowColumnIndex, KeyPressEventArgs)
Occurs when the key is pressed while the cell has focus.
Declaration
protected override void OnKeyPress(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, KeyPressEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the cell. |
System.Windows.Forms.KeyPressEventArgs | e | The System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnMouseDown(DataColumnBase, RowColumnIndex, MouseEventArgs)
Overridden to update the mouse down location of the filter bar cell.
Declaration
protected override void OnMouseDown(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The RowColumnIndex of the filter row cell. |
System.Windows.Forms.MouseEventArgs | e | An System.Windows.Forms.MouseHoverEventArgs that contains event data. |
Overrides
OnMouseHoverLeave(DataColumnBase, RowColumnIndex, MouseEventArgs)
Overridden to update the renderer on mouse leave.
Declaration
protected override void OnMouseHoverLeave(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The RowColumnIndex of the cell. |
System.Windows.Forms.MouseEventArgs | e | An System.Windows.Forms.MouseHoverEventArgs that contains event data. |
Overrides
OnMouseMove(DataColumnBase, RowColumnIndex, MouseEventArgs)
Overridden to update the filter options button state on the mouse move.
Declaration
protected override void OnMouseMove(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the mouse hovered cell. |
RowColumnIndex | rowColumnIndex | The row column index of the cell. |
System.Windows.Forms.MouseEventArgs | e | An System.Windows.Forms.MouseHoverEventArgs that contains event data. |
Overrides
OnMouseUp(DataColumnBase, RowColumnIndex, MouseEventArgs)
Overridden to update the mouse up operation on the filter bar cell.
Declaration
protected override void OnMouseUp(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The RowColumnIndex of the filter row cell. |
System.Windows.Forms.MouseEventArgs | e | An System.Windows.Forms.MouseHoverEventArgs that contains event data. |
Overrides
OnRender(Graphics, Rectangle, String, CellStyleInfo, DataColumnBase, RowColumnIndex)
Overridden to draw the filter row cell renderer.
Declaration
protected override void OnRender(Graphics paint, Rectangle cellRect, string cellValue, CellStyleInfo style, DataColumnBase column, RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | paint | The Graphics of the control. |
System.Drawing.Rectangle | cellRect | The Bounds of the control. |
System.String | cellValue | The cell value to be displayed. |
CellStyleInfo | style | The cell style of the filter row. |
DataColumnBase | column | The DataColumnBase of the corresponding cell. |
RowColumnIndex | rowColumnIndex | The row column index of the cell. |
Overrides
OnUnwireEditUIElement(E)
Overridden to unwire the events of the TextBox.
Declaration
protected override void OnUnwireEditUIElement(E uiElement)
Parameters
Type | Name | Description |
---|---|---|
E | uiElement | The TextBox control. |
Overrides
OnWireEditUIElement(E)
Overridden to wire the events of the TextBox.
Declaration
protected override void OnWireEditUIElement(E uiElement)
Parameters
Type | Name | Description |
---|---|---|
E | uiElement | The TextBox control. |
Overrides
OpenFilterOptionPopup()
Opens the drop down for the filter options pop up.
Declaration
public virtual void OpenFilterOptionPopup()
ProcessMultipleFilters(List<Object>, List<Object>)
Process filtering operation with the given filter values in the particular column.
Declaration
public virtual void ProcessMultipleFilters(List<object> filterValues, List<object> totalItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Object> | filterValues | The list of values that want to be filter in particular column. |
System.Collections.Generic.List<System.Object> | totalItems | The list of items which is loaded in ComboBox. |
ProcessSingleFilter(Object)
Process filtering operation with the given filter value for the column.
Declaration
public virtual void ProcessSingleFilter(object filterValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | filterValue | The filter value that needs to be applied for the column. |