Skip to content

Commit

Permalink
Update events.md
Browse files Browse the repository at this point in the history
  • Loading branch information
martinivanoff authored Dec 6, 2023
1 parent 2150598 commit a9892af
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions controls/raddatafilter/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ This topic will describe the various events exposed by **RadDataFilter**.

* **AutoGeneratingItemPropertyDefinition**: Occurs when RadDataFilter auto-generates item property definitions. Through the **ItemPropertyDefinition** you can get ahold of the generated property definition and cancel its creation if it does not pass your criteria.

#### __[C#] Example 1: Cancel the creation of a property definition__
{{region cs-raddatafilter-events_1}}
private void radDataFilter_AutoGeneratingItemPropertyDefinition(object sender, Telerik.Windows.Controls.Data.DataFilter.DataFilterAutoGeneratingItemPropertyDefinitionEventArgs e)
{
if (e.ItemPropertyDefinition.PropertyType == typeof(string))
{
e.Cancel = true;
}
}
#### __[C#] Example 1: Cancel the creation of a property definition__
{{region cs-raddatafilter-events_1}}
private void radDataFilter_AutoGeneratingItemPropertyDefinition(object sender, Telerik.Windows.Controls.Data.DataFilter.DataFilterAutoGeneratingItemPropertyDefinitionEventArgs e)
{
if (e.ItemPropertyDefinition.PropertyType == typeof(string))
{
e.Cancel = true;
}
}
{{endregion}}

* **EditorCreated**: Occurs when a filter editor has been created and before it is added to the visual tree. Use this event if you want to customize the editor for a given property definition. A good example of how to achieve this can be found in the [Create Custom Filter Editors]({%slug raddatafilter-how-to-create-custom-filter-editors%}) article.
Expand All @@ -48,9 +48,9 @@ This topic will describe the various events exposed by **RadDataFilter**.
{
if (e.ItemPropertyDefinition.PropertyType == typeof(int))
{
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNull);
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotNull);
e.DefaultOperator = Telerik.Windows.Data.FilterOperator.IsGreaterThanOrEqualTo;
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNull);
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotNull);
e.DefaultOperator = Telerik.Windows.Data.FilterOperator.IsGreaterThanOrEqualTo;
}
}
{{endregion}}
Expand Down

0 comments on commit a9892af

Please sign in to comment.