ClassRadDataFilterElement
Represents a data filter element that provides a hierarchical tree view interface for building filter expressions.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadDataFilterElement : RadTreeViewElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IDataItemSource
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<VirtualizedStackContainer<RadTreeNode>>VirtualizedScrollPanel<RadTreeNode, TreeNodeElement>RadTreeViewElementRadDataFilterElement
Implements:
Inherited Members
Constructors
RadDataFilterElement()
Initializes a new instance of the RadDataFilterElement class.
Declaration
public RadDataFilterElement()
Fields
Properties
AllowAdd
Gets or sets a value indicating whether [allow edit].
Declaration
public override bool AllowAdd { get; set; }
Property Value
true if [allow edit]; otherwise, false.
Overrides
AllowDragDrop
Gets or sets a value indicating whether [allow drag drop].
Declaration
public override bool AllowDragDrop { get; set; }
Property Value
true if [allow drag drop]; otherwise, false.
Overrides
AllowRemove
Gets or sets a value indicating whether [allow edit].
Declaration
public override bool AllowRemove { get; set; }
Property Value
true if [allow edit]; otherwise, false.
Overrides
AutoGenerateDescriptorItems
Gets or sets the auto generate descriptor items.
Declaration
public bool AutoGenerateDescriptorItems { get; set; }
Property Value
The auto generate descriptor items.
DataSource
Gets or sets the data source that the RadDataFilter is displaying filters for.
Declaration
public override object DataSource { get; set; }
Property Value
Overrides
DefaultCustomDateEditorFormat
Gets or sets the default custom date editor format.
Declaration
public string DefaultCustomDateEditorFormat { get; set; }
Property Value
The default custom date editor format.
DefaultDateEditorFormat
Gets or sets the default date editor format.
Declaration
public DateTimePickerFormat DefaultDateEditorFormat { get; set; }
Property Value
The default date editor format.
Descriptors
A collection of descriptor items used to identify the property names and their corresponding types.
Declaration
public DataFilterItemOwnerCollection Descriptors { get; }
Property Value
Expression
Gets or sets the expression.
Declaration
public virtual string Expression { get; set; }
Property Value
The expression.
FieldNamesSortStyle
Gets or sets a value indicating how the field names are sorted when SortFieldNames is true.
Declaration
public SortStyle FieldNamesSortStyle { get; set; }
Property Value
Provider
Gets or sets the provider.
Declaration
public IDataFilterProvider Provider { get; set; }
Property Value
The provider.
SortFieldNames
Gets or sets a value indicating whether the name of fields in fields drop down should be sorted.
TimeSpanEditorFormat
Gets or sets the format of TimeSpan editor.
Declaration
public string TimeSpanEditorFormat { get; set; }
Property Value
The timespan editor format.
Methods
AddChildNodes(FilterDescriptor, RadTreeNode)
Adds child nodes, based on the given filter descriptor and its child descriptors.
Declaration
public void AddChildNodes(FilterDescriptor filter, RadTreeNode node)
Parameters
filter
The filter.
node
The node, that will be the parent of created nodes.
AddChildNodes(FilterDescriptor, RadTreeNode, bool)
Adds child nodes based on the given filter descriptor, optionally updating descriptors.
Declaration
public void AddChildNodes(FilterDescriptor filter, RadTreeNode node, bool updateDescriptors)
Parameters
filter
The filter descriptor to add as a child node.
node
The parent node for the new child nodes.
updateDescriptors
A value indicating whether to update the descriptors.
AddDescriptorsFromProvider()
Declaration
protected virtual void AddDescriptorsFromProvider()
ApplyFilter()
Applies the filter to the DataSource.
Declaration
public void ApplyFilter()
BeginEdit()
Puts the current node in edit mode.
Declaration
public override bool BeginEdit()
Returns
true if editing was successfully started; otherwise, false.
Overrides
BuildTree()
Builds the tree based on the collection of filter descriptors.
Declaration
protected virtual void BuildTree()
ClearChildNodes(DataFilterGroupNode)
Clears the child nodes of given group node.
Declaration
public void ClearChildNodes(DataFilterGroupNode node)
Parameters
node
The node.
CreateAddNode()
Creates a new data filter add node that allows adding new filter conditions.
Declaration
protected virtual DataFilterAddNode CreateAddNode()
Returns
A new DataFilterAddNode instance.
CreateCriteriaNode()
Creates a new data filter criteria node that represents a single filter condition.
Declaration
protected virtual DataFilterCriteriaNode CreateCriteriaNode()
Returns
A new DataFilterCriteriaNode instance.
CreateDragDropService()
Creates and returns a new instance of the drag drop service for data filter operations.
Declaration
protected override TreeViewDragDropService CreateDragDropService()
Returns
A new DataFilterDragDropService instance.
Overrides
CreateElementProvider()
Creates and returns a new instance of the element provider for data filter tree nodes.
Declaration
protected override IVirtualizedElementProvider<RadTreeNode> CreateElementProvider()
Returns
IVirtualizedElementProvider<RadTreeNode>
A new DataFilterElementProvider instance.
Overrides
CreateGroupNode()
Creates a new data filter group node that represents a logical grouping of filter conditions.
Declaration
protected virtual DataFilterGroupNode CreateGroupNode()
Returns
A new DataFilterGroupNode instance.
DisposeManagedResources()
Releases all managed resources used by the component.
Declaration
protected override void DisposeManagedResources()
Overrides
EndInit()
Completes the initialization of the component.
Declaration
public override void EndInit()
Overrides
EnsureNodeVisibleHorizontal(RadTreeNode, TreeNodeElement)
Declaration
protected override void EnsureNodeVisibleHorizontal(RadTreeNode node, TreeNodeElement nodeElement)
Parameters
node
nodeElement
Overrides
GetDefaultPropertyName()
Gets the default name of field property.
GetDescriptorItemByName(string)
Declaration
protected virtual DataFilterDescriptorItem GetDescriptorItemByName(string name)
Parameters
name
Returns
GetEditor(Type)
Gets an editor instance for the specified editor type.
Declaration
protected override IInputEditor GetEditor(Type editorType)
Parameters
editorType
The type of editor to create.
Returns
An instance of the specified editor type.
Overrides
GetEditorType(Type)
Gets the type of the editor.
GetFieldNames()
Gets the field names.
Declaration
public IEnumerable<string> GetFieldNames()
Returns
IEnumerable<string>
GetFieldType(string)
Gets the type of the field by given property name.
InitializeDefaultContextMenu(RadTreeNode)
Declaration
protected override RadContextMenu InitializeDefaultContextMenu(RadTreeNode node)
Parameters
node
Returns
Overrides
InitializeEditor(Type, IValueEditor)
Initializes the editor.
Declaration
protected virtual void InitializeEditor(Type valueType, IValueEditor editor)
Parameters
valueType
Type of the value.
editor
The editor.
InitializeFieldEditor(IInputEditor, DataFilterCriteriaElement)
Declaration
protected virtual void InitializeFieldEditor(IInputEditor editor, DataFilterCriteriaElement editingElement)
Parameters
editor
editingElement
InitializeFields()
Initializes the fields of this instance to their default values.
Declaration
protected override void InitializeFields()
Overrides
InitializeOperatorEditor(IInputEditor, DataFilterCriteriaElement)
Declaration
protected virtual void InitializeOperatorEditor(IInputEditor editor, DataFilterCriteriaElement editingElement)
Parameters
editor
editingElement
InitializeSpinEditor(TreeViewSpinEditor, Type)
Initializes the spin editor.
Declaration
protected virtual void InitializeSpinEditor(TreeViewSpinEditor spinEditor, Type valueType)
Parameters
spinEditor
The spin editor.
valueType
Type of the value.
InitializeValueEditor(IInputEditor, DataFilterCriteriaElement)
Declaration
protected virtual void InitializeValueEditor(IInputEditor editor, DataFilterCriteriaElement editingElement)
Parameters
editor
editingElement
NormalizeChildDescriptor(CompositeFilterDescriptor)
Normalizes a composite filter descriptor by reorganizing its child descriptors.
Declaration
protected virtual void NormalizeChildDescriptor(CompositeFilterDescriptor compositeDescriptor)
Parameters
compositeDescriptor
The composite descriptor to normalize.
NormalizeExpression()
Normalizes the expression by processing composite filter descriptors.
Declaration
protected virtual void NormalizeExpression()
OnDragEnded(RadTreeViewDragEventArgs)
Declaration
protected override void OnDragEnded(RadTreeViewDragEventArgs e)
Parameters
e
Overrides
OnEditing(object, TreeNodeEditingEventArgs)
Raises the editing event for a tree node.
Declaration
protected override void OnEditing(object sender, TreeNodeEditingEventArgs e)
Parameters
sender
The sender of the event.
e
The TreeNodeEditingEventArgs instance containing the event data.
Overrides
OnEditorRequired(object, TreeNodeEditorRequiredEventArgs)
Called when an editor is required for a tree node element.
Declaration
protected override void OnEditorRequired(object sender, TreeNodeEditorRequiredEventArgs e)
Parameters
sender
The sender of the event.
e
TreeNodeEditorRequiredEventArgs
The TreeNodeEditorRequiredEventArgs instance containing the event data.
Overrides
OnLoaded()
Called when the element has been successfully loaded. That includes loading of all its children as well.
Declaration
protected override void OnLoaded()
Overrides
OnNodeRemoving(RadTreeViewCancelEventArgs)
Declaration
protected override void OnNodeRemoving(RadTreeViewCancelEventArgs e)
Parameters
e
Overrides
OnPropertyDisplayNameNeeded(object, PropertyDisplayNameNeededEventArgs)
Fires the event.
Declaration
protected virtual void OnPropertyDisplayNameNeeded(object sender, PropertyDisplayNameNeededEventArgs e)
Parameters
sender
e
RemoveChildNode(RadTreeNode)
Removes the child node.
Declaration
public void RemoveChildNode(RadTreeNode nodeToRemove)
Parameters
nodeToRemove
The node to remove.
RemoveChildNode(RadTreeNode, RadTreeNode)
Removes the child node.
Declaration
public void RemoveChildNode(RadTreeNode node, RadTreeNode childNode)
Parameters
node
The parent node.
childNode
The child node.
SaveEditorValue(TreeNodeElement, object)
Saves the editor value.
Declaration
protected override void SaveEditorValue(TreeNodeElement nodeElement, object newValue)
Parameters
nodeElement
The node element.
newValue
The new value.
Overrides
SetupDropDownList(DataFilterCriteriaNode, TreeViewDropDownListEditor)
Setups the drop down list.
Declaration
protected virtual object SetupDropDownList(DataFilterCriteriaNode criteriaNode, TreeViewDropDownListEditor editor)
Parameters
criteriaNode
The criteria node.
editor
The editor.
Returns
The display value.
UpdateNodesFromDescriptors()
Updates the nodes collection by removing all the nodes that does not have corresponding property name in the Descriptors collection.
Declaration
public virtual void UpdateNodesFromDescriptors()
ValidateAddNewNode()
Validates if adding new node is allowed.
Events
PropertyDisplayNameNeeded
Occurs when a property text is about to be displayed on the screen. Allows the developer to substitute property names with user-friendly display strings.
Declaration
public event PropertyDisplayNameNeededEventHandler PropertyDisplayNameNeeded
Event Value