Class GridFilterRowDateRenderer
Represents a class that handles the filter operation for a FilterRow that loads the SfCalendarDatePicker.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.DataGrid.RowFilter
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class GridFilterRowDateRenderer : GridFilterRowCellRenderer<TextBlock, SfCalendarDatePicker>, IGridCellRenderer, IDisposable, IGridFilterRowRenderer
Examples
this.sfDataGrid.FilterRowCellRenderers.Remove("Date");
this.sfDataGrid.FilterRowCellRenderers.Add("Date", new GridFilterRowDateRendererExt());
public class GridFilterRowDateRendererExt : GridFilterRowDateRenderer
{
public override void OnInitializeDisplayElement(DataColumnBase dataColumn, TextBlock uiElement, object dataContext)
{
base.OnInitializeDisplayElement(dataColumn, uiElement, dataContext);
uiElement.Foreground = new SolidColorBrush(Colors.DarkOrange);
}
}
Constructors
GridFilterRowDateRenderer()
Initializes a new instance of the GridFilterRowDateRenderer class.
Declaration
public GridFilterRowDateRenderer()
Methods
GetControlValue()
Gets the control value.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | The control value. |
Overrides
OnEditElementLoaded(Object, RoutedEventArgs)
Invoked when the edit element(SfCalenderDatePicker) is loaded on the cell in a column.
Declaration
protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Microsoft.UI.Xaml.RoutedEventArgs | e | The Microsoft.UI.Xaml.RoutedEventArgs instance containing the event data. |
Overrides
OnEditElementUnloaded(Object, RoutedEventArgs)
Invoked when the edit element(SfCalenderDatePicker) is unloaded on the cell in a column.
Declaration
protected override void OnEditElementUnloaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Microsoft.UI.Xaml.RoutedEventArgs | e | The Microsoft.UI.Xaml.RoutedEventArgs instance containing the event data. |
Overrides
OnEditingComplete(DataColumnBase, FrameworkElement)
Invoked when the editing is completed on the cell.
Declaration
protected override void OnEditingComplete(DataColumnBase dataColumn, FrameworkElement currentRendererElement)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The corresponding column. |
Microsoft.UI.Xaml.FrameworkElement | currentRendererElement | The corresponding renderer element. |
Overrides
OnFilterRowConditionChanged(String)
Process the filtering when the FilterRowCondition is changed in the corresponding column.
Declaration
public override void OnFilterRowConditionChanged(string filterRowCondition)
Parameters
Type | Name | Description |
---|---|---|
System.String | filterRowCondition | The new FilterRowCondition that has been changed. |
Overrides
OnInitializeDisplayElement(DataColumnBase, TextBlock, Object)
Method which initializes the display element of the column.
Declaration
public override void OnInitializeDisplayElement(DataColumnBase dataColumn, TextBlock uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the DataColumnBase. |
Microsoft.UI.Xaml.Controls.TextBlock | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context. |
Overrides
OnInitializeEditElement(DataColumnBase, SfCalendarDatePicker, Object)
Method which is used to initialize the renderer element bindings with corresponding column values.
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, SfCalendarDatePicker uiElement, object filterValue)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
SfCalendarDatePicker | uiElement | Specifies the corresponding renderer element. |
System.Object | filterValue | Specifies the filter value of the row. |
Overrides
ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
Let Renderer decide whether the parent grid should be allowed to handle keys and prevent the key event from being handled by the visual UIElement for this renderer.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.KeyRoutedEventArgs | e | A Microsoft.UI.Xaml.Input.KeyRoutedEventArgs object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the parent grid should be allowed to handle keys; false otherwise. |
Overrides
Remarks
If this method returns true the parent grid will handle arrow keys and set the Handled flag in the event data. Keys that the grid does not handle will be ignored and be routed to the UIElement for this renderer.