Class RadFilterViewElement
The main element of the RadFilterView control. Can be used as an element, hosted into another RadControl.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadFilterViewElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider, IDataItemSource, IFilterViewCategoriesOwner
Constructors
RadFilterViewElement()
Initializes a new instance of the RadFilterViewElement class.
Declaration
public RadFilterViewElement()
Properties
AssociatedFilterable
Gets or sets the associated filterable. This is a control or a class that implements the IFilterable interface.
Declaration
public IFilterable AssociatedFilterable { get; set; }
Property Value
IFilterable
|
AutoGenerateCategories
Gets or sets a value indicating whether to auto generate categories when the DataSource property is set.
Declaration
public bool AutoGenerateCategories { get; set; }
Property Value
System.Boolean
A value indicating whether to auto generate categories. |
Categories
Gets the categories collection.
Declaration
public RadItemOwnerGenericCollection<BaseFilterViewCategoryElement> Categories { get; }
Property Value
RadItemOwnerGenericCollection<BaseFilterViewCategoryElement>
|
CategoriesFactory
Gets or sets the factory responsible for creating category elements.
Declaration
public FilterViewCategoriesFactory CategoriesFactory { get; set; }
Property Value
FilterViewCategoriesFactory
|
ContextMenu
Gets or sets the context menu.
Declaration
public RadContextMenuDropDown ContextMenu { get; set; }
Property Value
RadContextMenuDropDown
|
DataSource
Gets or sets the data source.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
|
ElementsPanel
Gets the panel which holds all category elements.
Declaration
public StackLayoutPanel ElementsPanel { get; }
Property Value
StackLayoutPanel
|
Expression
Gets the filter expression.
Declaration
public string Expression { get; }
Property Value
System.String
|
FilterDescriptors
Gets the filter descriptors collection.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FilterDescriptorCollection
|
FilteringMode
Gets or sets the filtering mode.
Declaration
public FilteringMode FilteringMode { get; set; }
Property Value
FilteringMode
|
HorizontalScrollBar
Gets the horizontal scrollbar element.
Declaration
public RadScrollBarElement HorizontalScrollBar { get; }
Property Value
RadScrollBarElement
|
LoadCategoriesAsync
Declaration
public bool LoadCategoriesAsync { get; set; }
Property Value
System.Boolean
|
VerticalScrollBar
Gets the vertical scrollbar element.
Declaration
public RadScrollBarElement VerticalScrollBar { get; }
Property Value
RadScrollBarElement
|
Methods
ApplyFilterDescriptor(FilterDescriptor)
Applies a FilterDescriptor programmatically. Note that each category can apply a filter descriptor only when a specific FilterOperator is used. Here is a list of allowed operators for different categories: Text and CheckedDropDownList - IsEqualTo, IsContainedIn and IsNull. DropDownList - IsEqualTo, IsNull Bool - IsEqualTo, IsNotEqualTo Numeric - IsGreaterThan, IsGreaterThanOrEqualTo, IsLessThan, IsLessThanOrEqualTo or IsEqualTo. DateTime - IsGreaterThan, IsGreaterThanOrEqualTo, IsLessThan, IsLessThanOrEqualTo or IsEqualTo.
Declaration
public virtual bool ApplyFilterDescriptor(FilterDescriptor filterDescriptor)
Parameters
FilterDescriptor
filterDescriptor
|
Returns
System.Boolean
|
ArrangeOverride(SizeF)
Arranges the RadFilterViewElement to its final location. The element must call the Arrange method of each of its children.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The size that is available for element. |
Returns
System.Drawing.SizeF
The rectangle occupied by the element. Usually |
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
CategoryFilterChanged(IFilterViewCategory)
Called when the filter of a category is changed.
Declaration
public void CategoryFilterChanged(IFilterViewCategory categoryItem)
Parameters
IFilterViewCategory
categoryItem
The category with changed filter. |
Implements
ClearAllFilters()
Clears all applied filters.
Declaration
public virtual void ClearAllFilters()
CreateBindingContext()
Declaration
protected virtual BindingContext CreateBindingContext()
Returns
System.Windows.Forms.BindingContext
|
CreateChildElements()
Creates child elements.
Declaration
protected override void CreateChildElements()
Overrides
CreateContextMenu()
Creates context menu.
Declaration
protected virtual RadContextMenuDropDown CreateContextMenu()
Returns
RadContextMenuDropDown
The new RadContextMenuDropDown instance. |
CreateHorizontalScrollBarElement()
Creates a horizontal scrollbar.
Declaration
protected virtual RadScrollBarElement CreateHorizontalScrollBarElement()
Returns
RadScrollBarElement
The new RadScrollBarElement instance. |
CreateListSource()
Creates the list source.
Declaration
protected virtual RadListSource<FilterViewDataItem> CreateListSource()
Returns
RadListSource<FilterViewDataItem>
|
CreateStackPanel()
Creates a stack panel, which holds all categories.
Declaration
protected virtual StackLayoutPanel CreateStackPanel()
Returns
StackLayoutPanel
The new StackLayoutPanel instance. |
CreateVerticalScrollBarElement()
Creates a vertical scrollbar.
Declaration
protected virtual RadScrollBarElement CreateVerticalScrollBarElement()
Returns
RadScrollBarElement
The new RadScrollBarElement instance. |
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
InitializeCategories()
Initialized the categories.
Declaration
public virtual void InitializeCategories()
InitializeCategoriesAsync()
Initializes the categories asynchronously.
Declaration
public void InitializeCategoriesAsync()
InitializeDropDownMenu()
Initializes the items of the default context menu.
Declaration
protected virtual void InitializeDropDownMenu()
InitializeFields()
Initializes the fields.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the RadFilterViewElement
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The size that is available to the RadFilterViewElement. The available size can be infinity (to take the full size of the element) |
Returns
System.Drawing.SizeF
The minimum size required by the element to be completely visible. Cannot be infinity. |
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnCategoryCreated(FilterViewCategoryCreatedEventArgs)
Called when a category element is created. This event is suitable to modify properties of the Category element.
Declaration
protected virtual void OnCategoryCreated(FilterViewCategoryCreatedEventArgs args)
Parameters
FilterViewCategoryCreatedEventArgs
args
The event arguments. |
OnCategoryCreating(FilterViewCategoryCreatingEventArgs)
Called when a category is about to be created. This event is suitable to modify the values collection(sort/add/remove/reorder) or modify/replace the Category element.
Declaration
protected virtual void OnCategoryCreating(FilterViewCategoryCreatingEventArgs args)
Parameters
FilterViewCategoryCreatingEventArgs
args
The event arguments. |
OnContextMenuClosed()
Raises the ContextMenuClosed event.
Declaration
protected virtual void OnContextMenuClosed()
OnContextMenuClosing(CancelEventArgs)
Raises the ContextMenuClosing event.
Declaration
protected virtual void OnContextMenuClosing(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs
args
The event arguments. |
OnContextMenuItemClick(Object, EventArgs)
Called when an item of the context menu is clicked by the user.
Declaration
protected virtual void OnContextMenuItemClick(object sender, EventArgs e)
Parameters
System.Object
sender
The clicked item. |
System.EventArgs
e
The event arguments. |
OnContextMenuOpened()
Raises the ContextMenuOpened event.
Declaration
protected virtual void OnContextMenuOpened()
OnContextMenuOpening(CancelEventArgs)
Raises the ContextMenuOpening event.
Declaration
protected virtual void OnContextMenuOpening(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs
args
The event arguments. |
OnFilterChanged(FilterChangedEventArgs)
Called when the filter is changed.
Declaration
protected virtual void OnFilterChanged(FilterChangedEventArgs args)
Parameters
FilterChangedEventArgs
args
The event arguments. |
OnMouseDown(MouseEventArgs)
Called when a mouse-down event is fired.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The event arguments. |
Overrides
OnMouseMove(MouseEventArgs)
Called when a mouse-move event is fired.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The event arguments. |
Overrides
OnMouseUp(MouseEventArgs)
Called when a mouse-up event is fired.
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The event arguments. |
Overrides
OnMouseWheel(MouseEventArgs)
Raises the MouseWheel event.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The event arguments. |
Overrides
PrepareCategories()
Identifies and creates the categories elements.
Declaration
protected virtual void PrepareCategories()
ProcessCategoryData()
Processes and populates with data the categories.
Declaration
protected virtual void ProcessCategoryData()
ProcessMouseWheelScroll(MouseEventArgs, RadScrollBarElement)
Called when a mouse wheel event is raised.
Declaration
protected virtual void ProcessMouseWheelScroll(MouseEventArgs e, RadScrollBarElement scrollBar)
Parameters
System.Windows.Forms.MouseEventArgs
e
The event arguments. |
RadScrollBarElement
scrollBar
The scrollbar element. |
RemoveFilterDescriptor(FilterDescriptor)
Clears the filter of the category that matches the PropertyName of the given FilterDescriptor.
Declaration
public virtual void RemoveFilterDescriptor(FilterDescriptor filterDescriptor)
Parameters
FilterDescriptor
filterDescriptor
|
SetupCategory(BaseFilterViewCategoryElement, ICollection<Object>)
Fires the CategoryCreating and CategoryCreated events and creates category items.
Declaration
public void SetupCategory(BaseFilterViewCategoryElement category, ICollection<object> values)
Parameters
BaseFilterViewCategoryElement
category
The category element. |
System.Collections.Generic.ICollection<System.Object>
values
The values of the category. |
ShouldArrangeChild(RadElement)
Gets a value indicating, whether a child will be arranged during the ArrangeOverride.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
RadElement
child
The child. |
Returns
System.Boolean
Whether the child will be arranged in ArrangeOverride. |
Overrides
ShouldMeasureChild(RadElement)
Gets a value indicating, whether a child will be measured during the MeasureOverride.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
RadElement
child
The child. |
Returns
System.Boolean
Whether the child will be measured in MeasureOverride. |
Overrides
ShowContextMenu(IFilterViewCategory, Point)
Shows a context menu by given category and location.
Declaration
public virtual void ShowContextMenu(IFilterViewCategory category, Point location)
Parameters
IFilterViewCategory
category
The category. |
System.Drawing.Point
location
The location of context menu. |
Implements
UpdateAssociatedFilterable()
Updates the FilterDescriptors collection of the AssociatedFilterable with current filters applied to this element categories.
Declaration
protected virtual void UpdateAssociatedFilterable()
UpdateCategory(IFilterViewCategory)
Declaration
public void UpdateCategory(IFilterViewCategory category)
Parameters
IFilterViewCategory
category
|
Implements
UpdateScrollbars()
Updates the scroll bars visibility and value range.
Declaration
public void UpdateScrollbars()
Events
CategoryCreated
An event that occurs when a category is created and populated with items. This event is suitable to modify properties of the Category element.
Declaration
public event FilterViewCategoryCreatedEventHandler CategoryCreated
Event Type
FilterViewCategoryCreatedEventHandler
|
CategoryCreating
An event that occurs when a category is created and is about to be populated with items. This event is suitable to modify the values collection(sort/add/remove/reorder) or modify/replace the Category element.
Declaration
public event FilterViewCategoryCreatingEventHandler CategoryCreating
Event Type
FilterViewCategoryCreatingEventHandler
|
ContextMenuClosed
Occurs when the context menu is closed.
Declaration
public event EventHandler ContextMenuClosed
Event Type
System.EventHandler
|
ContextMenuClosing
Occurs when the context menu is closing.
Declaration
public event CancelEventHandler ContextMenuClosing
Event Type
System.ComponentModel.CancelEventHandler
|
ContextMenuItemClick
Occurs when an item in the context menu is clicked.
Declaration
public event HandledEventHandler ContextMenuItemClick
Event Type
System.ComponentModel.HandledEventHandler
|
ContextMenuOpened
Occurs when the context menu is opened.
Declaration
public event EventHandler ContextMenuOpened
Event Type
System.EventHandler
|
ContextMenuOpening
Occurs when the context menu is opening.
Declaration
public event CancelEventHandler ContextMenuOpening
Event Type
System.ComponentModel.CancelEventHandler
|
FilterChanged
An event that occurs when the filter is changed.
Declaration
public event FilterChangedEventHandler FilterChanged
Event Type
FilterChangedEventHandler
|
Explicit Interface Implementations
IDataItemSource.BindingComplete()
IDataItemSource.BindingContext
Declaration
BindingContext IDataItemSource.BindingContext { get; }
Returns
System.Windows.Forms.BindingContext
|
Implements
IDataItemSource.BindingContextChanged
Declaration
event EventHandler IDataItemSource.BindingContextChanged
Returns
System.EventHandler
|
Implements
IDataItemSource.Initialize()
Initializes IDataItemSource.
Declaration
void IDataItemSource.Initialize()
Implements
IDataItemSource.MetadataChanged(PropertyDescriptor)
Declaration
void IDataItemSource.MetadataChanged(PropertyDescriptor pd)
Parameters
System.ComponentModel.PropertyDescriptor
pd
|