Class TreeGridFilterControl
Represents a control that contains the details about how to filter the data in SfTreeGrid by using the filter popup in TreeGridFilterControl.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.TreeGrid.Filtering
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class TreeGridFilterControl : ContentControl, IDisposable, INotifyPropertyChanged
Constructors
TreeGridFilterControl()
Initializes a new instance of the TreeGridFilterControl class.
Declaration
public TreeGridFilterControl()
Fields
AdvancedFilterStyleProperty
. Identifies the AdvancedFilterStyle dependency property.
Declaration
public static readonly DependencyProperty AdvancedFilterStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AdvancedFilterStyle dependency property.
AllowBlankFiltersProperty
Identifies the AllowBlankFilters dependency property.
Declaration
public static readonly DependencyProperty AllowBlankFiltersProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowBlankFilters dependency property.
AscendingSortStringProperty
Identifies the AscendingSortString dependency property.
Declaration
public static readonly DependencyProperty AscendingSortStringProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AscendingSortString dependency property.
CheckBoxFilterStyleProperty
Identifies the CheckBoxFilterStyle dependency property.
Declaration
public static readonly DependencyProperty CheckBoxFilterStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the
DescendingSortStringProperty
Identifies the DescendingSortString dependency property.
Declaration
public static readonly DependencyProperty DescendingSortStringProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the DescendingSortString dependency property.
FilterColumnTypeProperty
Identifies the FilterColumnType dependency property.
Declaration
public static readonly DependencyProperty FilterColumnTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterColumnType dependency property.
FilteredFromProperty
Identifies the FilteredFrom dependency property.
Declaration
public static readonly DependencyProperty FilteredFromProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilteredFrom dependency property.
FilterModeProperty
Identifies the FilterMode dependency property.
Declaration
public static readonly DependencyProperty FilterModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterMode dependency property.
FilterPopupHeightProperty
Identifies the FilterPopupHeight dependency property.
Declaration
public static readonly DependencyProperty FilterPopupHeightProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterPopupHeight dependency property.
FilterPopupWidthProperty
Identifies the FilterPopupWidth dependency property.
Declaration
public static readonly DependencyProperty FilterPopupWidthProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the
HorizontalOffsetProperty
Identifies the HorizontalOffset dependency property.
Declaration
public static readonly DependencyProperty HorizontalOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the HorizontalOffset dependency property.
ImmediateUpdateColumnFilterProperty
Identifies the ImmediateUpdateColumnFilter dependency property.
Declaration
public static readonly DependencyProperty ImmediateUpdateColumnFilterProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ImmediateUpdateColumnFilter dependency property.
IsAdvancedFilterVisibleProperty
Identifies the IsAdvancedFilterVisible dependency property.
Declaration
public static readonly DependencyProperty IsAdvancedFilterVisibleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the IsAdvancedFilterVisible dependency property.
IsOpenProperty
Identifies the IsOpen dependency property.
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ResizingThumbVisibilityProperty
Identifies the ResizingThumbVisibility dependency property.
Declaration
public static readonly DependencyProperty ResizingThumbVisibilityProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ResizingThumbVisibility dependency property.
SortOptionVisibilityProperty
Identifies the SortOptionVisibility dependency property.
Declaration
public static readonly DependencyProperty SortOptionVisibilityProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SortOptionVisibility dependency property.
VerticalOffsetProperty
Identifies the VerticalOffset dependency property.
Declaration
public static readonly DependencyProperty VerticalOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the VerticalOffset dependency property.
Properties
AdvancedFilterStyle
Gets or sets the style applied to TreeGridAdvancedFilterControl.
Declaration
public Style AdvancedFilterStyle { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Style | The style which is applied to TreeGridAdvancedFilterControl in SfTreeGrid. The default value is null. |
Remarks
To define a Windows.UI.Xaml.Style for a AdvancedFilter, specify a TargetType of TreeGridAdvancedFilterControl.
AdvancedFilterType
Gets or sets AdvancedFilterType for
Declaration
public AdvancedFilterType AdvancedFilterType { get; set; }
Property Value
Type | Description |
---|---|
AdvancedFilterType | One of the AdvancedFilterType enumeration that specifies which Advanced filter type needs to be loaded. The default value is TextFilter. |
AllowBlankFilters
Gets or sets a value indicating whether to allow the Blank Filters.
Declaration
public bool AllowBlankFilters { get; set; }
Property Value
Type |
---|
System.Boolean |
AscendingSortString
Gets or sets the text content to the AscendingSortButton in TreeGridFilterControl.
Declaration
public string AscendingSortString { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the AscendingSortString of TreeGridFilterControl. The default value is |
Remarks
The value of AscendingSortString is updated from GridLocalizationResources by using the key SortStringAscending.
Examples
this.treeGrid.FilterItemsPopulating += treeGrid_FilterItemsPopulating;
void treeGrid_FilterItemsPopulating(object sender, Syncfusion.UI.Xaml.Grid.TreeGridFilterItemsPopulatingEventArgs e)
{
if (e.Column.MappingName == "OrderID")
{
e.FilterControl.AscendingSortString = GridLocalizationResourceAccessor.Instance.GetLocalizedStringResource("SortStringAscending");
e.FilterControl.DescendingSortString = GridLocalizationResourceAccessor.Instance.GetLocalizedStringResource("SortStringDescending");
}
}
CheckBoxFilterStyle
Gets or sets the style applied to TreeGridCheckBoxFilterControl.
Declaration
public Style CheckBoxFilterStyle { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Style | The style which is applied to TreeGridCheckBoxFilterControl in SfTreeGrid. The default value is null. |
Column
Gets or sets the column.
Declaration
public TreeGridColumn Column { get; set; }
Property Value
Type |
---|
TreeGridColumn |
DescendingSortString
Gets or sets the text content to the DescendingSortButton in TreeGridFilterControl.
Declaration
public string DescendingSortString { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies DescendingSortString of TreeGridFilterControl. The default value is |
Remarks
The value of DescendingSortString is updated from GridLocalizationResources by using the key SortStringDescending.
FilterColumnType
Gets or sets a value that indicates the FilterColumnType in TreeGridFilterControl.Which is used to show the text content of the AdvancedFilterButton in TreeGridFilterControl.
Declaration
public string FilterColumnType { get; set; }
Property Value
Type | Description |
---|---|
System.String | FilterColumnType is used to show which type of AdvancedFilter is loaded in TreeGridFilterControl.The default value of FilterColumnType is TextFilters. |
Remarks
Whenever the AdvancedFilterType property is changed at that time the FilterColumnType is also gets updated to show the AdvancedFilterType text in AdvancedFilterButton.
FilteredFrom
Gets or sets a value indicating whether column is filtered from Checkbox or Advanced filter.
Declaration
public FilteredFrom FilteredFrom { get; set; }
Property Value
Type | Description |
---|---|
FilteredFrom | One of the FilteredFrom enumeration that specifies whether column is filtered from Checkbox or Advanced filter. The default mode is None. |
FilterMode
Gets or sets a value to specify the FilterMode.
Declaration
public FilterMode FilterMode { get; set; }
Property Value
Type | Description |
---|---|
FilterMode | One of the FilterMode enumeration that specifies the FilterMode in SfTreeGrid The default mode is Both. |
FilterPopupHeight
Gets or sets the height for the filter popup.
Declaration
public double FilterPopupHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 450.00d |
Examples
<Grid.Resources>
<Style TargetType="treeGrid:TreeGridFilterControl" x:Key="gridFilterControlStyle">
<Setter Property="FilterPopupHeight" Value="300"/>
<Setter Property="FilterPopupWidth" Value="250"/>
</Style>
</Grid.Resources>
<treeGrid:SfTreeGrid x:Name="sfTreeGrid"
FilterPopupStyle="{StaticResource gridFilterControlStyle}"
ItemsSource="{Binding Employees}"/>
FilterPopupWidth
Gets or sets width for filter popup.
Declaration
public double FilterPopupWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 300.00d |
Examples
<Grid.Resources>
<Style TargetType="treeGrid:TreeGridFilterControl" x:Key="gridFilterControlStyle">
<Setter Property="FilterPopupHeight" Value="300"/>
<Setter Property="FilterPopupWidth" Value="250"/>
</Style>
</Grid.Resources>
<treeGrid:SfTreeGrid x:Name="sfTreeGrid"
FilterPopupStyle="{StaticResource gridFilterControlStyle}"
ItemsSource="{Binding Employees}"/>
HorizontalOffset
Gets or sets HorizontalOffset for the filter popup.
Declaration
public double HorizontalOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0d |
ImmediateUpdateColumnFilter
Gets or sets a value that indicates whether the data is automatically filtered as soon as an user selects or types value in the filter pop-up of column.
Declaration
public bool ImmediateUpdateColumnFilter { get; set; }
Property Value
Type |
---|
System.Boolean |
IsAdvancedFilterVisible
Gets or sets a value that indicates whether the AdvancedFilter is visible or not.
Declaration
public bool IsAdvancedFilterVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if AdvancedFilter is visible; otherwise,false. The default value is false. |
IsOpen
Gets or sets a value that indicates whether the filter popup is opened or not.
Declaration
public bool IsOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the filter popup is opened; otherwise, false. The default value is false. |
ResizingThumbVisibility
Gets or sets a value indicating the ResizingThumb Visibility
Declaration
public Visibility ResizingThumbVisibility { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Visibility | One of the Windows.UI.Xaml.Visibility enumeration that specifies the visibility of ResizingThumb. The default mode is Windows.UI.Xaml.Visibility.Visible. |
SortOptionVisibility
Gets or sets a value indicating the SortOptionVisibility.
Declaration
public Visibility SortOptionVisibility { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Visibility | One of the Windows.UI.Xaml.Visibility enumeration that specifies the visibility of SortOption. The default mode is Windows.UI.Xaml.Visibility.Visible. |
VerticalOffset
Gets or sets the VerticalOffset for filter popup.
Declaration
public double VerticalOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0d |
Methods
Dispose()
Disposes all the resources used by the TreeGridFilterControl class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the TreeGridFilterControl class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
GetFormattedString(Object)
Gets the formatted string for the actual value of the corresponding record in the filter column.
Declaration
public string GetFormattedString(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | Which holds the actual value of the corresponding record in the filter column. |
Returns
Type | Description |
---|---|
System.String | Returns the formatted string for the actual value of the corresponding record in the filter column. |
OnApplyTemplate()
Builds the visual tree for the TreeGridFilterControl when a new template is applied.
Declaration
protected override void OnApplyTemplate()
OnKeyDown(KeyRoutedEventArgs)
Called before the KeyDown event occurs.
Declaration
protected override void OnKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | e | Windows.UI.Xaml.Input.KeyRoutedEventArgs instance that contains event data. |
OnPointerMoved(PointerRoutedEventArgs)
Called before the PointerMoved event occurs.
Declaration
protected override void OnPointerMoved(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | Windows.UI.Xaml.Input.PointerRoutedEventArgs instance that contains event data. |
Events
OkButtonClick
Occurs when the OkButton is clicked
Declaration
public event EventHandler<OkButtonClikEventArgs> OkButtonClick
Event Type
Type |
---|
System.EventHandler<OkButtonClikEventArgs> |
OnFilterElementChanged
Occurs when the FilterElement is changed.
Declaration
public event EventHandler<OnFilterElementPropertyChangedEventArgs> OnFilterElementChanged
Event Type
Type |
---|
System.EventHandler<OnFilterElementPropertyChangedEventArgs> |
PopupOpened
Occurs when the filter Popup is opened.
Declaration
public event EventHandler<PopupOpenedEventArgs> PopupOpened
Event Type
Type |
---|
System.EventHandler<PopupOpenedEventArgs> |
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |