From 9ab44dc1eaad3018f2ab29d4b03c4ff07cda3bed Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Tue, 8 Oct 2024 18:29:16 +0300 Subject: [PATCH 01/25] docs(common):Create common article for descriptors --- common-features/composite-filter-descriptor.md | 18 ++++++++++++++++++ components/filter/overview.md | 2 +- components/gantt/gantt-tree/filter/overview.md | 11 +++++++---- components/grid/filter/overview.md | 15 ++++++++------- components/grid/state.md | 2 +- components/treelist/filter/overview.md | 14 ++++++++------ 6 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 common-features/composite-filter-descriptor.md diff --git a/common-features/composite-filter-descriptor.md b/common-features/composite-filter-descriptor.md new file mode 100644 index 0000000000..3a2c33adfd --- /dev/null +++ b/common-features/composite-filter-descriptor.md @@ -0,0 +1,18 @@ +--- +title: Composite Filter Descriptor +page_title: Composite Filter Descriptor +description: Discover the CompositeFilterDescriptor properties and how to access the filter descriptor value. +slug: common-features-composite-filter-descriptor +tags: telerik,blazor,compositefilterdescriptor +published: True +position: 8 +--- + +# Composite Filter Descriptor + +The [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor) exposes two properties: +* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors)—The property represents a [`FilterDescriptorCollection`](/blazor-ui/api/Telerik.DataSource.FilterDescriptorCollection). The `FilterDescriptorCollection` contains [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor) instances. To get the properties of each filter descriptor instance cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: + * The `Member`—The field where the user filters. Each filter descriptor describes also the `MemberType`, that represents the type of the field. + * The `Operator`—The [`FilterOperator`](/blazor-ui/api/telerik.datasource.filteroperator) that applies. There are different operators depending on the `MemberType`. Read more about the [filter operators]({%slug common-features-filter-operators%}). + * The `Value`—The user input to filter by. +* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator)—It can be either AND or OR. The logical operator applies between the filter descriptor instances. \ No newline at end of file diff --git a/components/filter/overview.md b/components/filter/overview.md index 6d6fcbcbb4..98c7039211 100644 --- a/components/filter/overview.md +++ b/components/filter/overview.md @@ -63,7 +63,7 @@ The Blazor Filter provides parameters that allow you to configure the component: | Parameter | Type | Description | | ----------- | ----------- | ----------- | | `Class` | `string` | The class that will be rendered on the outermost element. | -| `Value` | `CompositeFilterDescriptor` | Sets the value of the filter component. | +| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}) | Sets the value of the filter component. | ## Filter Reference and Methods diff --git a/components/gantt/gantt-tree/filter/overview.md b/components/gantt/gantt-tree/filter/overview.md index 4030bd0c84..e0c45a21b6 100644 --- a/components/gantt/gantt-tree/filter/overview.md +++ b/components/gantt/gantt-tree/filter/overview.md @@ -26,13 +26,16 @@ You can filter more than one column at a time, and all filter rules will be appl ## Filter Descriptors -The Gantt filter state is stored in [CompositeFilterDescriptors](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). The below information is important if you want to [get or change the Gantt filters programmatically]({%slug gantt-state%}). +The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). The below information is important if you want to [get or change the Gantt filters programmatically]({%slug gantt-state%}). -Each `CompositeFilterDescriptor` contains a [**collection** of `FilterDescriptor`s](/blazor-ui/api/Telerik.DataSource.FilterDescriptorCollection). All descriptors in the collection are applied with an *AND* or an *OR* `LogicalOperator`. +When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: -* [Filter Row]({%slug gantt-filter-row%}) - each `CompositeFilterDescriptor` targets a specific field. By default, one filter can be applied to a field using the Filter Row operator. The filter value is stored in the first `FilterDescriptor` instance of the `CompositeFilterDescriptor` for that field. +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) -* [Filter Menu]({%slug gantt-filter-menu%}) - each `CompositeFilterDescriptor` targets a specific field. Filter values from the separate filter operators in the menu are stored in different `FilterDescriptor` instances of the dedicated `CompositeFilterDescriptor` for that field. +| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | +| --- | --- | --- | +| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | ## Customize The Filter Editors diff --git a/components/grid/filter/overview.md b/components/grid/filter/overview.md index d736c8dd93..55aee9068c 100644 --- a/components/grid/filter/overview.md +++ b/components/grid/filter/overview.md @@ -37,16 +37,17 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter% ## Filter Descriptors -The Grid filter state is stored in [`CompositeFilterDescriptors`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). Use the following information if you want to [get or change the Grid filters programmatically]({%slug grid-state%}). +The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). Use the following information if you want to [get or change the Grid filters programmatically]({%slug grid-state%}). -Each `CompositeFilterDescriptor` includes a collection of filter descriptors, where all descriptors in the collection are applied with an AND or OR logical operator. +When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: -* [Filter Row]({%slug grid-filter-row%})—Each `CompositeFilterDescriptor` targets a specific field. By default, one filter can be applied to a field using the Filter Row operator, with the filter value stored in the first filter descriptor instance for that field. - -* [Filter Menu]({%slug grid-filter-menu%})—Each `CompositeFilterDescriptor` targets a specific field. The filter values from separate filter operators in the menu are stored in different filter descriptor instances within the `CompositeFilterDescriptor` for that field. - -* [SearchBox]({%slug grid-searchbox%})—A `CompositeFilterDescriptor` is created in the state when the user types in the search box. By default, it targets all string fields, adding a dedicated filter descriptor instance for each string field. Each filter descriptor contains the filter value typed in the search box. +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) +| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | +| --- | --- | --- | +| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | +| SearchBox | Filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. | OR | ## Custom Filtering diff --git a/components/grid/state.md b/components/grid/state.md index 5ca4ab48f6..dd092598d8 100644 --- a/components/grid/state.md +++ b/components/grid/state.md @@ -39,7 +39,7 @@ The Grid state is a generic [class `GridState`](/blazor-ui/api/Telerik.Bl | `InsertedItem` | `TItem`* | The data item that is being added in `Inline` or `Popup` edit mode. [Not applicable for `Incell` editing]({%slug components/grid/editing/incell%}#event-sequence). | | `OriginalEditItem` | `TItem`* | The original copy of the data item that is currently in edit mode. This `GridState` property holds the unmodified data item values. | | `Page` | `int?` | The current [page index]({%slug components/grid/features/paging%}). Some user actions reset the page index to 1, such as filtering or changing the page size. | -| `SearchFilter` | `IFilterDescriptor` | The `CompositeFilterDescriptor` that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | +| `SearchFilter` | `IFilterDescriptor` | The [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}) that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | | `SelectedItems` | `ICollection` | The currently [selected data item(s)]({%slug grid-selection-overview%}). | | `Skip` | `int?` | The number of scrolled data items when using [virtual row scrolling]({%slug components/grid/virtual-scrolling%}). In other words, this is the number of rows above the currently visible ones. | | `SortDescriptors` | `ICollection` | The currently applied [sorts]({%slug components/grid/features/sorting%}). | diff --git a/components/treelist/filter/overview.md b/components/treelist/filter/overview.md index 92d8fbf75b..24e29060a1 100644 --- a/components/treelist/filter/overview.md +++ b/components/treelist/filter/overview.md @@ -44,15 +44,17 @@ In addition to the two main filtering modes, the treelist offers two more featur ## Filter Descriptors -The TreeList filter state is stored in [CompositeFilterDescriptors](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). The below information is important if you want to [get or change the TreeList filters programmatically]({%slug treelist-state%}). +The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). The below information is important if you want to [get or change the TreeList filters programmatically]({%slug treelist-state%}). -Each `CompositeFilterDescriptor` contains a [**collection** of `FilterDescriptor`s](/blazor-ui/api/Telerik.DataSource.FilterDescriptorCollection). All descriptors in the collection are applied with an *AND* or an *OR* `LogicalOperator`. +When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: -* [Filter Row]({%slug treelist-filter-row%}) - each `CompositeFilterDescriptor` targets a specific field. By default, one filter can be applied to a field using the Filter Row operator. The filter value is stored in the first `FilterDescriptor` instance of the `CompositeFilterDescriptor` for that field. - -* [Filter Menu]({%slug treelist-filter-menu%}) - each `CompositeFilterDescriptor` targets a specific field. Filter values from the separate filter operators in the menu are stored in different `FilterDescriptor` instances of the dedicated `CompositeFilterDescriptor` for that field. +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) -* [SearchBox]({%slug treelist-searchbox%}) - one `CompositeFilterDescriptor` is created in the state when the user types in the Searchbox. By default, it targets all `string` fields. A dedicated `FilterDescriptor` instance is added to this `CompositeFilterDescriptor` for each `string` field. Each `FilterDescriptor` instance contains the filter value typed in the Searchbox. +| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | +| --- | --- | --- | +| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | +| SearchBox | Filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. | OR | ## Customize The Filter Editors From 6b392698d447e0c7e1e48ea1a81ee6652e2b6b71 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:11:21 +0300 Subject: [PATCH 02/25] Update components/gantt/gantt-tree/filter/overview.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- components/gantt/gantt-tree/filter/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gantt/gantt-tree/filter/overview.md b/components/gantt/gantt-tree/filter/overview.md index e0c45a21b6..5beecb70bd 100644 --- a/components/gantt/gantt-tree/filter/overview.md +++ b/components/gantt/gantt-tree/filter/overview.md @@ -34,7 +34,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get | Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | | --- | --- | --- | -| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields of the menu, then the `Value` of this filter descriptor instance is null. | Depending on the user's choice. | | FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | From 59a9ec213998dd89878a65b2a5b3659ea9ce84be Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Tue, 15 Oct 2024 19:06:18 +0300 Subject: [PATCH 03/25] revamp by adding all descriptors --- .../composite-filter-descriptor.md | 18 -- common-features/descriptors.md | 299 ++++++++++++++++++ components/filter/overview.md | 2 +- .../gantt/gantt-tree/filter/overview.md | 2 +- components/grid/filter/overview.md | 2 +- components/grid/state.md | 2 +- 6 files changed, 303 insertions(+), 22 deletions(-) delete mode 100644 common-features/composite-filter-descriptor.md create mode 100644 common-features/descriptors.md diff --git a/common-features/composite-filter-descriptor.md b/common-features/composite-filter-descriptor.md deleted file mode 100644 index 3a2c33adfd..0000000000 --- a/common-features/composite-filter-descriptor.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Composite Filter Descriptor -page_title: Composite Filter Descriptor -description: Discover the CompositeFilterDescriptor properties and how to access the filter descriptor value. -slug: common-features-composite-filter-descriptor -tags: telerik,blazor,compositefilterdescriptor -published: True -position: 8 ---- - -# Composite Filter Descriptor - -The [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor) exposes two properties: -* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors)—The property represents a [`FilterDescriptorCollection`](/blazor-ui/api/Telerik.DataSource.FilterDescriptorCollection). The `FilterDescriptorCollection` contains [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor) instances. To get the properties of each filter descriptor instance cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: - * The `Member`—The field where the user filters. Each filter descriptor describes also the `MemberType`, that represents the type of the field. - * The `Operator`—The [`FilterOperator`](/blazor-ui/api/telerik.datasource.filteroperator) that applies. There are different operators depending on the `MemberType`. Read more about the [filter operators]({%slug common-features-filter-operators%}). - * The `Value`—The user input to filter by. -* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator)—It can be either AND or OR. The logical operator applies between the filter descriptor instances. \ No newline at end of file diff --git a/common-features/descriptors.md b/common-features/descriptors.md new file mode 100644 index 0000000000..4f72f70d23 --- /dev/null +++ b/common-features/descriptors.md @@ -0,0 +1,299 @@ +--- +title: Descriptors - FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor +page_title: Descriptors - FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor +description: Discover the FilterDescriptor, SortDescriptor, SearchFilter and GroupDescriptor properties and how to access their values. +slug: common-features-descriptors +tags: telerik,blazor,filterdescriptor, sortdescriptor, groupdescriptor, searchfilter +published: True +position: 8 +--- + +# Common + +There are two ways to obtain the applied filtering, searching, sorting, grouping criteria: + +* Through the component [`OnRead` event]({%slug common-features-data-binding-onread%}) handler. Use the [`Request` property]({%slug common-features-data-binding-onread%}#event-argument) of the [event argument object](/blazor-ui/api/Telerik.Blazor.Components.ReadEventArgs): + +````CS +async Task OnReadHandler(...ReadEventArgs args) +{ + // Get the applied filtering and searching criteria + // args.Request.Filters + + // Get the applied grouping criteria, including: + // *the field by which the user groups + // *the sort direction of the groups ordering + // args.Request.Groups + + // Get the applied sorting criteria, including: + // *the field which the user sorts + // *the sort direction + // args.Request.Sorts +} +```` + + +* Through the component state. Use the component state property of the `OnStateChanged` event argument. For example: + +````CS +async Task OnStateChangedHandler(GridStateEventArgs args) +{ + // Get the applied filtering criteria + // args.GridState.FilterDescriptors + + // Get the applied searching criteria + // args.GridState.SearchFilter + + // Get the applied grouping criteria, including: + // *the field by which the user groups + // *the sort direction of the groups ordering + // args.GridState.GroupDescriptors + + // Get the applied sorting criteria, including: + // *the field which the user sorts + // *the sort direction + // args.GridState.SortDescriptors +} +```` + + +# Filtering + +The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). + +The `CompositeFilterDescriptor` exposes: +* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To get the properties of each filter descriptor instance cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: + * The `Member`—The field where the user filters. Each filter descriptor describes also the `MemberType`, that represents the type of the field. + * The `Operator`—The [`FilterOperator`](/blazor-ui/api/telerik.datasource.filteroperator) that applies. There are different operators depending on the `MemberType`. Read more about the [filter operators]({%slug common-features-filter-operators%}). + * The `Value`—The user input to filter by. +* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either AND or OR. The logical operator applies between the filter descriptor instances. + +When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: + +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) + +| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | +| --- | --- | --- | +| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | + + +# Searching + +The searching criteria is stored in an individual `IFilterDescriptor`. To access the filtering criteria, cast the `IFilterDescriptor` to `CompositeFilterDescriptor`. The `FilterDescriptors` property of the `CompositeFilterDescriptor` gets filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is OR. + + +# Sorting + +The current sorting criteria is stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor). Each `SortDescriptor` instance gives access to: + * The `Member`—The field where the user sorts. + * The `SortDirection`—The sort direction for this sort descriptor. + + +# Grouping + +Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. + + +# Example with `OnRead` Event + +````CSHTML +@using Telerik.DataSource +@using Telerik.DataSource.Extensions + +

@ConsoleSim

+ + + + + + + + + + + + + + +@code { + private MarkupString ConsoleSim { get; set; } // to showcase what you get + + private async Task OnReadHandler(GridReadEventArgs args) + { + string output = string.Empty; + + //get the filtering and searching criteria + output += "FILTERS:
"; + foreach (var item in args.Request.Filters) + { + if (item is CompositeFilterDescriptor) + { + CompositeFilterDescriptor currFilter = (CompositeFilterDescriptor)item; + output += $"START nested filter: Logical operator: {currFilter.LogicalOperator}, details:
"; + foreach (FilterDescriptor nestedFilter in currFilter.FilterDescriptors) + { + output += $"Filtered field: {nestedFilter.Member}, Filter operator: {nestedFilter.Operator}, Filter value: {nestedFilter.Value}
"; + } + output += "END nested filter
"; + } + } + + //get the sorting criteria + output += "SORTS:
"; + foreach (SortDescriptor item in args.Request.Sorts) + { + output += $"Sorted field: {item.Member}, Sort direction: {item.SortDirection}
"; + } + + //get the grouping criteria + output += "GROUPS:
"; + foreach (GroupDescriptor item in args.Request.Groups) + { + output += $"Grouped field: {item.Member}, Group sort direction: {item.SortDirection}
"; + } + + ConsoleSim = new MarkupString(output); + + var result = PristineData.ToDataSourceResult(args.Request); + + args.Data = result.Data; + args.Total = result.Total; + } + + private IEnumerable PristineData = Enumerable.Range(1, 300).Select(x => new SampleData + { + Id = x, + Name = "name " + x, + Team = "team " + x % 5, + HireDate = DateTime.Now.AddDays(-x).Date + }); + + public class SampleData + { + public int Id { get; set; } + public string Name { get; set; } + public string Team { get; set; } + public DateTime HireDate { get; set; } + } +} +```` + +# Example Through the Component State +````CSHTML +@using System.Text.Json +@using Telerik.DataSource + +

@ConsoleSim

+ + + + + + + + + + + + + +@code { + private MarkupString ConsoleSim { get; set; } + + private List GridData { get; set; } = new List(); + + private async Task OnGridStateChanged(GridStateEventArgs args) + { + string output = string.Empty; + + //get the searching criteria + output += "SEARCHING:
"; + var searching = args.GridState.SearchFilter; + + if (searching is CompositeFilterDescriptor) + { + CompositeFilterDescriptor currSearch = searching as CompositeFilterDescriptor; + output += $"START nested searching: Logical operator: {currSearch.LogicalOperator}, details:
"; + // by design, there will actually be 2 only, this showcases the concept and the types + foreach (FilterDescriptor nestedSearch in currSearch.FilterDescriptors) + { + output += $"Search field: {nestedSearch.Member}, Search operator {nestedSearch.Operator}, Search value: {nestedSearch.Value}
"; + } + output += "END nested searching
"; + } + + + //get the filtering criteria + output += "FILTERS:
"; + + foreach (var item in args.GridState.FilterDescriptors) + { + if (item is CompositeFilterDescriptor) + { + CompositeFilterDescriptor currFilter = item as CompositeFilterDescriptor; + output += $"START nested filter: Logical operator: {currFilter.LogicalOperator}, details:
"; + foreach (FilterDescriptor nestedFilter in currFilter.FilterDescriptors) + { + output += $"Filtered field: {nestedFilter.Member}, Filter operator: {nestedFilter.Operator}, Filter value: {nestedFilter.Value}
"; + } + output += "END nested filter
"; + } + } + + //get the sorting criteria + output += "SORTS:
"; + foreach (SortDescriptor item in args.GridState.SortDescriptors) + { + output += $"Sorted field: {item.Member}, Sort direction: {item.SortDirection}
"; + } + + //get the grouping criteria + output += "GROUPS:
"; + foreach (SortDescriptor item in args.GridState.GroupDescriptors) + { + output += $"Grouped field: {item.Member}, Group sort direction: {item.SortDirection}
"; + } + + ConsoleSim = new MarkupString(output); + } + + protected override void OnInitialized() + { + var rnd = new Random(); + + for (int i = 1; i <= 12; i++) + { + GridData.Add(new Product() + { + Id = i, + Name = $"Product {i}", + Category = $"Category {i % 4 + 1}", + Stock = rnd.Next(0, 100), + Discontinued = i % 3 == 0 + }); + } + } + + public class Product + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Category { get; set; } = string.Empty; + public int Stock { get; set; } + public bool Discontinued { get; set; } + } +} +```` diff --git a/components/filter/overview.md b/components/filter/overview.md index 98c7039211..a30afe489a 100644 --- a/components/filter/overview.md +++ b/components/filter/overview.md @@ -63,7 +63,7 @@ The Blazor Filter provides parameters that allow you to configure the component: | Parameter | Type | Description | | ----------- | ----------- | ----------- | | `Class` | `string` | The class that will be rendered on the outermost element. | -| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}) | Sets the value of the filter component. | +| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}) | Sets the value of the filter component. | ## Filter Reference and Methods diff --git a/components/gantt/gantt-tree/filter/overview.md b/components/gantt/gantt-tree/filter/overview.md index 5beecb70bd..a51098bbba 100644 --- a/components/gantt/gantt-tree/filter/overview.md +++ b/components/gantt/gantt-tree/filter/overview.md @@ -26,7 +26,7 @@ You can filter more than one column at a time, and all filter rules will be appl ## Filter Descriptors -The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). The below information is important if you want to [get or change the Gantt filters programmatically]({%slug gantt-state%}). +The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}). The below information is important if you want to [get or change the Gantt filters programmatically]({%slug gantt-state%}). When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: diff --git a/components/grid/filter/overview.md b/components/grid/filter/overview.md index 55aee9068c..f081f83218 100644 --- a/components/grid/filter/overview.md +++ b/components/grid/filter/overview.md @@ -37,7 +37,7 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter% ## Filter Descriptors -The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). Use the following information if you want to [get or change the Grid filters programmatically]({%slug grid-state%}). +The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}). Use the following information if you want to [get or change the Grid filters programmatically]({%slug grid-state%}). When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: diff --git a/components/grid/state.md b/components/grid/state.md index dd092598d8..0d1636ccba 100644 --- a/components/grid/state.md +++ b/components/grid/state.md @@ -39,7 +39,7 @@ The Grid state is a generic [class `GridState`](/blazor-ui/api/Telerik.Bl | `InsertedItem` | `TItem`* | The data item that is being added in `Inline` or `Popup` edit mode. [Not applicable for `Incell` editing]({%slug components/grid/editing/incell%}#event-sequence). | | `OriginalEditItem` | `TItem`* | The original copy of the data item that is currently in edit mode. This `GridState` property holds the unmodified data item values. | | `Page` | `int?` | The current [page index]({%slug components/grid/features/paging%}). Some user actions reset the page index to 1, such as filtering or changing the page size. | -| `SearchFilter` | `IFilterDescriptor` | The [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}) that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | +| `SearchFilter` | `IFilterDescriptor` | The [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}) that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | | `SelectedItems` | `ICollection` | The currently [selected data item(s)]({%slug grid-selection-overview%}). | | `Skip` | `int?` | The number of scrolled data items when using [virtual row scrolling]({%slug components/grid/virtual-scrolling%}). In other words, this is the number of rows above the currently visible ones. | | `SortDescriptors` | `ICollection` | The currently applied [sorts]({%slug components/grid/features/sorting%}). | From ea577b1aea28789c4f109418517e639932b4b9c3 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Fri, 18 Oct 2024 20:54:20 +0300 Subject: [PATCH 04/25] revamp main and refer related articles --- .../data-binding/cloud-services.md | 2 +- .../{ => data-binding}/descriptors.md | 50 ++++++++++++------- .../{ => data-binding}/filter-operators.md | 2 +- .../data-binding/observable-data.md | 2 +- .../telerik-datasource-package.md | 2 +- components/autocomplete/events.md | 2 + components/autocomplete/filter.md | 6 ++- components/combobox/events.md | 2 + components/combobox/filter.md | 6 ++- components/dropdownlist/events.md | 4 +- components/dropdownlist/filter.md | 6 ++- components/filter/overview.md | 2 +- .../gantt/gantt-tree/filter/overview.md | 12 +---- components/gantt/gantt-tree/sorting.md | 2 + components/gantt/state.md | 2 + components/grid/filter/overview.md | 12 +---- components/grid/state.md | 6 ++- components/multicolumncombobox/events.md | 2 + components/multicolumncombobox/filter.md | 6 ++- components/multiselect/events.md | 2 + components/multiselect/filter.md | 6 ++- components/treelist/filter/overview.md | 12 +---- components/treelist/sorting.md | 2 + components/treelist/state.md | 2 + 24 files changed, 89 insertions(+), 63 deletions(-) rename common-features/{ => data-binding}/descriptors.md (82%) rename common-features/{ => data-binding}/filter-operators.md (99%) rename common-features/{ => data-binding}/telerik-datasource-package.md (99%) diff --git a/common-features/data-binding/cloud-services.md b/common-features/data-binding/cloud-services.md index 1d902149f5..de14435860 100644 --- a/common-features/data-binding/cloud-services.md +++ b/common-features/data-binding/cloud-services.md @@ -5,7 +5,7 @@ description: How to data bind Telerik Blazor components to cloud data services s slug: common-features-data-binding-cloud tags: telerik,blazor,binding,databinding,cloud published: True -position: 15 +position: 30 --- # Databinding to Cloud Services diff --git a/common-features/descriptors.md b/common-features/data-binding/descriptors.md similarity index 82% rename from common-features/descriptors.md rename to common-features/data-binding/descriptors.md index 4f72f70d23..77bb1ffca8 100644 --- a/common-features/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -5,14 +5,25 @@ description: Discover the FilterDescriptor, SortDescriptor, SearchFilter and Gro slug: common-features-descriptors tags: telerik,blazor,filterdescriptor, sortdescriptor, groupdescriptor, searchfilter published: True -position: 8 +position: 10 --- -# Common + +## Components with Descriptors + +This article explains how to retrieve the applied filtering, searching, sorting, and grouping criteria in Blazor components. The article applies to components that support these features. The components that offer one or all of the functionalities are: +* The [Filter]({%slug filter-overview%}) +* The [Gantt]({%slug gantt-overview%}) +* The [TreeList]({%slug treelist-overview%}) +* All components that [expose the `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event). + +## Obtain Filtering, Searching, Sorting, Grouping criteria There are two ways to obtain the applied filtering, searching, sorting, grouping criteria: -* Through the component [`OnRead` event]({%slug common-features-data-binding-onread%}) handler. Use the [`Request` property]({%slug common-features-data-binding-onread%}#event-argument) of the [event argument object](/blazor-ui/api/Telerik.Blazor.Components.ReadEventArgs): +#### Through the OnRead Event + +Use the [`Request` property]({%slug common-features-data-binding-onread%}#event-argument) of the [`OnRead` event argument object](/blazor-ui/api/Telerik.Blazor.Components.ReadEventArgs): ````CS async Task OnReadHandler(...ReadEventArgs args) @@ -32,8 +43,8 @@ async Task OnReadHandler(...ReadEventArgs args) } ```` - -* Through the component state. Use the component state property of the `OnStateChanged` event argument. For example: +#### Through the Component State +Use the component state property of the `OnStateChanged` event argument. For example: ````CS async Task OnStateChangedHandler(GridStateEventArgs args) @@ -56,17 +67,19 @@ async Task OnStateChangedHandler(GridStateEventArgs args) } ```` +At the bottom of the article you will find full examples. + -# Filtering +## Filtering The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). The `CompositeFilterDescriptor` exposes: -* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To get the properties of each filter descriptor instance cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: +* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: * The `Member`—The field where the user filters. Each filter descriptor describes also the `MemberType`, that represents the type of the field. * The `Operator`—The [`FilterOperator`](/blazor-ui/api/telerik.datasource.filteroperator) that applies. There are different operators depending on the `MemberType`. Read more about the [filter operators]({%slug common-features-filter-operators%}). * The `Value`—The user input to filter by. -* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either AND or OR. The logical operator applies between the filter descriptor instances. +* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either AND or OR. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: @@ -78,24 +91,26 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get | FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | -# Searching +## Searching -The searching criteria is stored in an individual `IFilterDescriptor`. To access the filtering criteria, cast the `IFilterDescriptor` to `CompositeFilterDescriptor`. The `FilterDescriptors` property of the `CompositeFilterDescriptor` gets filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is OR. +The searching criteria are stored in an individual `IFilterDescriptor`. To access the filtering criteria, cast the `IFilterDescriptor` to `CompositeFilterDescriptor`. The `FilterDescriptors` property of the `CompositeFilterDescriptor` gets filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is OR. -# Sorting +## Sorting -The current sorting criteria is stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor). Each `SortDescriptor` instance gives access to: - * The `Member`—The field where the user sorts. - * The `SortDirection`—The sort direction for this sort descriptor. +The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor). Each `SortDescriptor` instance gives access to: +* The `Member`—The field where the user sorts. +* The `SortDirection`—The sort direction for this sort descriptor. -# Grouping +## Grouping Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. -# Example with `OnRead` Event +## Examples + +#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor in the OnRead Event Handler ````CSHTML @using Telerik.DataSource @@ -185,7 +200,8 @@ The current sorting criteria is stored in a collection of [`SortDescriptor`](/bl } ```` -# Example Through the Component State +#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor Through the Component State + ````CSHTML @using System.Text.Json @using Telerik.DataSource diff --git a/common-features/filter-operators.md b/common-features/data-binding/filter-operators.md similarity index 99% rename from common-features/filter-operators.md rename to common-features/data-binding/filter-operators.md index 9f11202dcb..f4fe2c5989 100644 --- a/common-features/filter-operators.md +++ b/common-features/data-binding/filter-operators.md @@ -5,7 +5,7 @@ description: Supported Filter Operators in the Telerik UI for Blazor component s slug: common-features-filter-operators tags: telerik,blazor,filter,operator published: True -position: 10 +position: 15 --- # Filter Operators diff --git a/common-features/data-binding/observable-data.md b/common-features/data-binding/observable-data.md index 6ce4f6c924..c4360d11f9 100644 --- a/common-features/data-binding/observable-data.md +++ b/common-features/data-binding/observable-data.md @@ -6,7 +6,7 @@ slug: common-features-observable-data tags: telerik,blazor,observable,data,live,INotifyCollectionChanged published: True previous_url: /common-features/observable-data -position: 10 +position: 25 --- # Observable Data and Refresh Data diff --git a/common-features/telerik-datasource-package.md b/common-features/data-binding/telerik-datasource-package.md similarity index 99% rename from common-features/telerik-datasource-package.md rename to common-features/data-binding/telerik-datasource-package.md index 464fa087c4..355b225112 100644 --- a/common-features/telerik-datasource-package.md +++ b/common-features/data-binding/telerik-datasource-package.md @@ -5,7 +5,7 @@ description: Details about the Telerik.DataSource NuGet package that come with T slug: common-features-datasource-package tags: telerik,blazor,data,source,package published: True -position: 50 +position: 20 --- # Telerik DataSource Package diff --git a/components/autocomplete/events.md b/components/autocomplete/events.md index 80c568c5af..708f7ec832 100644 --- a/components/autocomplete/events.md +++ b/components/autocomplete/events.md @@ -124,6 +124,8 @@ You can use the he [`OnRead` event]({%slug common-features-data-binding-onread%} You can also call remote data through async operations. +Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). + When using `OnRead`, make sure to set `TItem` and `TValue`. >caption Custom Data according to the user input in the AutoComplete diff --git a/components/autocomplete/filter.md b/components/autocomplete/filter.md index 8c1bd3abcd..26b607cd05 100644 --- a/components/autocomplete/filter.md +++ b/components/autocomplete/filter.md @@ -12,7 +12,11 @@ position: 10 The AutoComplete component can filter the available suggestions, according to the current input. In this way users can find the desired value faster. To see the difference in behavior, visit the [Live Demo: AutoComplete Filtering](https://demos.telerik.com/blazor-ui/autocomplete/filtering) page. -To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. You can also implement custom (server) filtering and set a data source dynamically through the [`OnRead` event]({%slug autocomplete-events%}#onread). +To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. + +You can also use the [`OnRead` event]({%slug autocomplete-events%}#onread) to: +* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). +* Implement custom (server) filtering and set a data source dynamically. ## Filter Operator diff --git a/components/combobox/events.md b/components/combobox/events.md index fd0f6b0990..5a82ca6403 100644 --- a/components/combobox/events.md +++ b/components/combobox/events.md @@ -183,6 +183,8 @@ You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) t You can also call remote data through `async` operations. +Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). + When using `OnRead`, make sure to set `TItem` and `TValue`. >caption Custom Data according to the user input in the ComboBox diff --git a/components/combobox/filter.md b/components/combobox/filter.md index b9a08057e7..efb95a2f0e 100644 --- a/components/combobox/filter.md +++ b/components/combobox/filter.md @@ -12,7 +12,11 @@ position: 10 The ComboBox component allows the user to filter the available items by their text, so they can find the one they need faster. -To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. You can also implement custom (server) filtering and set a data source dynamically through the [`OnRead` event]({%slug components/combobox/events%}#onread). +To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. + +You can also use the [`OnRead` event]({%slug components/combobox/events%}#onread) to: +* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). +* Implement custom (server) filtering and set a data source dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/dropdownlist/events.md b/components/dropdownlist/events.md index 5b0f3c5477..69840f232b 100644 --- a/components/dropdownlist/events.md +++ b/components/dropdownlist/events.md @@ -103,7 +103,9 @@ You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) t * the component initializes * the user [filters]({%slug components/dropdownlist/filter%}) -* the user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled +* the user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled. + +Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). You can also call remote data through `async` operations. diff --git a/components/dropdownlist/filter.md b/components/dropdownlist/filter.md index e7f14f343e..3c5826dc60 100644 --- a/components/dropdownlist/filter.md +++ b/components/dropdownlist/filter.md @@ -12,7 +12,11 @@ position: 10 The DropDownList filter textbox allows users to filter the available items by their text and find the one they need faster. The filtering input is at the top of the dropdown popup. -To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. You can also implement custom (server) filtering and set a data source dynamically through the [`OnRead` event]({%slug components/dropdownlist/events%}#onread). +To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. + +You can also use the [`OnRead` event]({%slug components/dropdownlist/events%}#onread) to: +* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). +* Implement custom (server) filtering and set a data source dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/filter/overview.md b/components/filter/overview.md index a30afe489a..76f51229df 100644 --- a/components/filter/overview.md +++ b/components/filter/overview.md @@ -63,7 +63,7 @@ The Blazor Filter provides parameters that allow you to configure the component: | Parameter | Type | Description | | ----------- | ----------- | ----------- | | `Class` | `string` | The class that will be rendered on the outermost element. | -| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}) | Sets the value of the filter component. | +| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering) | Sets the value of the filter component. | ## Filter Reference and Methods diff --git a/components/gantt/gantt-tree/filter/overview.md b/components/gantt/gantt-tree/filter/overview.md index a51098bbba..a5e9114aee 100644 --- a/components/gantt/gantt-tree/filter/overview.md +++ b/components/gantt/gantt-tree/filter/overview.md @@ -26,17 +26,7 @@ You can filter more than one column at a time, and all filter rules will be appl ## Filter Descriptors -The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}). The below information is important if you want to [get or change the Gantt filters programmatically]({%slug gantt-state%}). - -When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: - -@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) - -| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | -| --- | --- | --- | -| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields of the menu, then the `Value` of this filter descriptor instance is null. | Depending on the user's choice. | -| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | - +The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). ## Customize The Filter Editors diff --git a/components/gantt/gantt-tree/sorting.md b/components/gantt/gantt-tree/sorting.md index 05618bfa47..c8fe9e8128 100644 --- a/components/gantt/gantt-tree/sorting.md +++ b/components/gantt/gantt-tree/sorting.md @@ -24,6 +24,8 @@ Sorting keeps the expanded/collapsed state of items. For example, if filtering b You can let the user sort by more than one field by setting the `SortMode` parameter to `Telerik.Blazor.SortMode.Multiple`. +The sorting criteria are stored in a [collection of `SortDescriptor`]({%slug common-features-descriptors%}#sorting). + >caption Enable Sorting in Telerik TreeList ````CSHTML diff --git a/components/gantt/state.md b/components/gantt/state.md index 0ac981fe1c..0f7cab717f 100644 --- a/components/gantt/state.md +++ b/components/gantt/state.md @@ -564,6 +564,8 @@ Sometimes you may want to know what the user changed in the Gantt (e.g., when th Find out what the user changed in the Gantt through the `PropertyName` of the `GanttStateEventArgs`. Override the user action by changing and then setting your desired state. +Find out how to [get the applied by the user filtering and sorting criteria]({%slug common-features-descriptors%}). + >caption Know when the Gantt state changes, which parameter changes, and amend the change ````CSHTML diff --git a/components/grid/filter/overview.md b/components/grid/filter/overview.md index f081f83218..2809a6cea7 100644 --- a/components/grid/filter/overview.md +++ b/components/grid/filter/overview.md @@ -37,17 +37,7 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter% ## Filter Descriptors -The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}). Use the following information if you want to [get or change the Grid filters programmatically]({%slug grid-state%}). - -When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: - -@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) - -| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | -| --- | --- | --- | -| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | -| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | -| SearchBox | Filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. | OR | +The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). ## Custom Filtering diff --git a/components/grid/state.md b/components/grid/state.md index 0d1636ccba..dcecde4997 100644 --- a/components/grid/state.md +++ b/components/grid/state.md @@ -34,12 +34,12 @@ The Grid state is a generic [class `GridState`](/blazor-ui/api/Telerik.Bl | `EditField` | `string` | The currently edited data item property in [`Incell` edit mode]({%slug components/grid/editing/incell%}). | | `EditItem` | `TItem`* | The currently edited data item in [any edit mode]({%slug components/grid/editing/overview%}). | | `ExpandedItems` | `ICollection` | The expanded data items, when [using `` (hierarchy)]({%slug components/grid/features/hierarchy%}). | -| `FilterDescriptors` | `ICollection` | All filtering criteria, except the ones that relate to the[`GridSearchBox`]({%slug grid-searchbox%}). | +| `FilterDescriptors` | `ICollection` | A collection of [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering), except the ones that relate to the [`GridSearchBox`]({%slug grid-searchbox%}). | | `GroupDescriptors` | `ICollection` | Information about currently applied [grouping]({%slug components/grid/features/grouping%}). | | `InsertedItem` | `TItem`* | The data item that is being added in `Inline` or `Popup` edit mode. [Not applicable for `Incell` editing]({%slug components/grid/editing/incell%}#event-sequence). | | `OriginalEditItem` | `TItem`* | The original copy of the data item that is currently in edit mode. This `GridState` property holds the unmodified data item values. | | `Page` | `int?` | The current [page index]({%slug components/grid/features/paging%}). Some user actions reset the page index to 1, such as filtering or changing the page size. | -| `SearchFilter` | `IFilterDescriptor` | The [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}) that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | +| `SearchFilter` | `IFilterDescriptor` | The [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering) that holds the filter descriptors for the [`GridSearchBox`]({%slug grid-searchbox%}). | | `SelectedItems` | `ICollection` | The currently [selected data item(s)]({%slug grid-selection-overview%}). | | `Skip` | `int?` | The number of scrolled data items when using [virtual row scrolling]({%slug components/grid/virtual-scrolling%}). In other words, this is the number of rows above the currently visible ones. | | `SortDescriptors` | `ICollection` | The currently applied [sorts]({%slug components/grid/features/sorting%}). | @@ -176,6 +176,8 @@ Here is some additional information about certain `PropertyName` values: To observe the changes in the Grid state more easily, copy and run the following example in a local app and at full screen. +Find out how to [get the applied by the user filtering, sorting and grouping criteria]({%slug common-features-descriptors%}). + >caption Using Grid OnStateChanged ````CSHTML diff --git a/components/multicolumncombobox/events.md b/components/multicolumncombobox/events.md index d4ce2d75e3..80c2bb0dd7 100644 --- a/components/multicolumncombobox/events.md +++ b/components/multicolumncombobox/events.md @@ -206,6 +206,8 @@ You can use the `OnRead` event to provide data to the component according to som You can also call remote data through `async` operations. +Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). + When using `OnRead`, make sure to set `TItem` and `TValue`. >tip You can also [debounce the service calls and implement minimum filter length]({%slug combo-kb-debounce-onread%}). diff --git a/components/multicolumncombobox/filter.md b/components/multicolumncombobox/filter.md index e8af430eed..20336a8855 100644 --- a/components/multicolumncombobox/filter.md +++ b/components/multicolumncombobox/filter.md @@ -12,7 +12,11 @@ position: 10 The MultiColumnComboBox component allows users to filter items by their text, so they can find the one they need faster. -To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. You can also implement custom (server) filtering and set a data source dynamically through the [`OnRead` event]({%slug multicolumncombobox-events%}#onread). +To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. + +You can also use the [`OnRead` event]({%slug multicolumncombobox-events%}#onread) to: +* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). +* Implement custom (server) filtering and set a data source dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/multiselect/events.md b/components/multiselect/events.md index 0f41ad264e..75a3928e20 100644 --- a/components/multiselect/events.md +++ b/components/multiselect/events.md @@ -104,6 +104,8 @@ You can use the he [`OnRead` event]({%slug common-features-data-binding-onread%} You can also call remote data through async operations. +Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). + >caption Custom Data according to the user input in the MultiSelect ````CSHTML diff --git a/components/multiselect/filter.md b/components/multiselect/filter.md index d0ecff0e2b..5964638533 100644 --- a/components/multiselect/filter.md +++ b/components/multiselect/filter.md @@ -12,7 +12,11 @@ position: 10 The MultiSelect component can filter the available suggestions according to the current user input, so they can find the one they need faster. To see the difference in behavior, visit the [Live Demo: MultiSelect Filtering](https://demos.telerik.com/blazor-ui/multiselect/filtering) page. -To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. You can also implement custom (server) filtering and set a data source dynamically through the [`OnRead` event]({%slug multiselect-events%}#onread). +To enable filtering, set the `Filterable` parameter to `true`. The filtering is case insensitive. + +You can also use the [`OnRead` event]({%slug multiselect-events%}#onread) to: +* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). +* Implement custom (server) filtering and set a data source dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/treelist/filter/overview.md b/components/treelist/filter/overview.md index 24e29060a1..c441fdc1cc 100644 --- a/components/treelist/filter/overview.md +++ b/components/treelist/filter/overview.md @@ -44,17 +44,7 @@ In addition to the two main filtering modes, the treelist offers two more featur ## Filter Descriptors -The filtering criteria for each filtered field is stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-composite-filter-descriptor%}). The below information is important if you want to [get or change the TreeList filters programmatically]({%slug treelist-state%}). - -When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: - -@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) - -| Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | -| --- | --- | --- | -| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | -| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | -| SearchBox | Filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. | OR | +The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). ## Customize The Filter Editors diff --git a/components/treelist/sorting.md b/components/treelist/sorting.md index 08f086ee05..464c38d332 100644 --- a/components/treelist/sorting.md +++ b/components/treelist/sorting.md @@ -24,6 +24,8 @@ Sorting keeps the expanded/collapsed state of items. For example, if filtering b You can let the user sort by more than one field by setting the `SortMode` parameter to `Telerik.Blazor.SortMode.Multiple`. +The sorting criteria are stored in a [collection of `SortDescriptor`]({%slug common-features-descriptors%}#sorting). + >caption Enable Sorting in Telerik TreeList ````CSHTML diff --git a/components/treelist/state.md b/components/treelist/state.md index d1d0c974aa..92a261291b 100644 --- a/components/treelist/state.md +++ b/components/treelist/state.md @@ -537,6 +537,8 @@ Sometimes you may want to know what the user changed in the TreeList (e.g., when The example below shows how to achieve it by using the`OnStateChanged` event. +Find out how to [get the applied by the user filtering and sorting criteria]({%slug common-features-descriptors%}). + >caption Know when the TreeList state changes, which parameter changed and amend the change ````CSHTML From bfc3894d3c2af6b7bf6f8ca87ed6a5590a156b13 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Mon, 21 Oct 2024 10:26:32 +0300 Subject: [PATCH 05/25] update common article --- common-features/data-binding/descriptors.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 77bb1ffca8..5f258b104c 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -15,7 +15,7 @@ This article explains how to retrieve the applied filtering, searching, sorting, * The [Filter]({%slug filter-overview%}) * The [Gantt]({%slug gantt-overview%}) * The [TreeList]({%slug treelist-overview%}) -* All components that [expose the `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event). +* All components that [expose the `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping. ## Obtain Filtering, Searching, Sorting, Grouping criteria @@ -72,14 +72,16 @@ At the bottom of the article you will find full examples. ## Filtering -The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). +The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`: + +* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast each `IFilterDescriptor` to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). +* Otherwise, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). + +### CompositeFilterDescriptor The `CompositeFilterDescriptor` exposes: -* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast the `IFilterDescriptor` to a [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). Each `FilterDescriptor` instance gives access to: - * The `Member`—The field where the user filters. Each filter descriptor describes also the `MemberType`, that represents the type of the field. - * The `Operator`—The [`FilterOperator`](/blazor-ui/api/telerik.datasource.filteroperator) that applies. There are different operators depending on the `MemberType`. Read more about the [filter operators]({%slug common-features-filter-operators%}). - * The `Value`—The user input to filter by. -* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either AND or OR. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. +* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. +* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: From 62539860efc19fa34182dac8ae82bd56144dbfa4 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:07:05 +0300 Subject: [PATCH 06/25] Update common-features/data-binding/descriptors.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 5f258b104c..2a4cb3328a 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -12,10 +12,11 @@ position: 10 ## Components with Descriptors This article explains how to retrieve the applied filtering, searching, sorting, and grouping criteria in Blazor components. The article applies to components that support these features. The components that offer one or all of the functionalities are: -* The [Filter]({%slug filter-overview%}) -* The [Gantt]({%slug gantt-overview%}) -* The [TreeList]({%slug treelist-overview%}) -* All components that [expose the `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping. + +* [Components that [expose an `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping. +* [Filter]({%slug filter-overview%}) +* [Gantt]({%slug gantt-overview%}) +* [TreeList]({%slug treelist-overview%}) ## Obtain Filtering, Searching, Sorting, Grouping criteria From 3395085b1911992f6669f46771a81353919daeaf Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:07:45 +0300 Subject: [PATCH 07/25] Update common-features/data-binding/descriptors.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 2a4cb3328a..7fecc91a48 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -18,7 +18,7 @@ This article explains how to retrieve the applied filtering, searching, sorting, * [Gantt]({%slug gantt-overview%}) * [TreeList]({%slug treelist-overview%}) -## Obtain Filtering, Searching, Sorting, Grouping criteria +## Get Sort, Filter, Group, and Search Descriptors There are two ways to obtain the applied filtering, searching, sorting, grouping criteria: From f6457841e727d2a3b22ee0d597deed927cc22643 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:08:38 +0300 Subject: [PATCH 08/25] Update common-features/data-binding/descriptors.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 7fecc91a48..5897f7bbbe 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -22,7 +22,7 @@ This article explains how to retrieve the applied filtering, searching, sorting, There are two ways to obtain the applied filtering, searching, sorting, grouping criteria: -#### Through the OnRead Event +### Through the OnRead Event Use the [`Request` property]({%slug common-features-data-binding-onread%}#event-argument) of the [`OnRead` event argument object](/blazor-ui/api/Telerik.Blazor.Components.ReadEventArgs): From ba641c34554c8c91c8c49b36d3bfe95f4d926832 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:09:14 +0300 Subject: [PATCH 09/25] Update common-features/data-binding/descriptors.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 5897f7bbbe..2fefb86265 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -81,6 +81,7 @@ The filtering criteria for each filtered field is stored in an individual collec ### CompositeFilterDescriptor The `CompositeFilterDescriptor` exposes: + * [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. * [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. From 40037bba60bda81c40efe17fa38384a9706368e9 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:10:28 +0300 Subject: [PATCH 10/25] Update common-features/data-binding/descriptors.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 2fefb86265..dc8600450c 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -102,7 +102,7 @@ The searching criteria are stored in an individual `IFilterDescriptor`. To acces ## Sorting -The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor). Each `SortDescriptor` instance gives access to: +The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor) objects. Each `SortDescriptor` instance gives access to: * The `Member`—The field where the user sorts. * The `SortDirection`—The sort direction for this sort descriptor. From e8d8f0d9661e103c005e1ceacedfc4e9faebf01e Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:11:35 +0300 Subject: [PATCH 11/25] Update components/filter/overview.md Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- components/filter/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/filter/overview.md b/components/filter/overview.md index 76f51229df..0b9e124cb1 100644 --- a/components/filter/overview.md +++ b/components/filter/overview.md @@ -63,7 +63,7 @@ The Blazor Filter provides parameters that allow you to configure the component: | Parameter | Type | Description | | ----------- | ----------- | ----------- | | `Class` | `string` | The class that will be rendered on the outermost element. | -| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering) | Sets the value of the filter component. | +| `Value` | [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering) | Sets the value of the Filter component. | ## Filter Reference and Methods From accf9161945b2a85b97f409385f25c0b1a1ec545 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Mon, 21 Oct 2024 18:41:25 +0300 Subject: [PATCH 12/25] update after review --- common-features/data-binding/descriptors.md | 27 ++++++++++--------- components/autocomplete/events.md | 10 +++---- components/autocomplete/filter.md | 2 +- components/combobox/events.md | 8 +++--- components/combobox/filter.md | 2 +- components/dropdownlist/events.md | 8 +++--- components/dropdownlist/filter.md | 2 +- .../gantt/gantt-tree/filter/overview.md | 5 ++-- components/gantt/state.md | 2 +- components/grid/filter/overview.md | 2 +- components/grid/state.md | 2 +- components/multicolumncombobox/events.md | 8 +++--- components/multicolumncombobox/filter.md | 2 +- components/multiselect/events.md | 8 +++--- components/multiselect/filter.md | 2 +- components/treelist/filter/overview.md | 2 +- components/treelist/state.md | 2 +- 17 files changed, 48 insertions(+), 46 deletions(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index dc8600450c..58ea47db47 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -9,11 +9,11 @@ position: 10 --- -## Components with Descriptors +## Data Operation Descriptors This article explains how to retrieve the applied filtering, searching, sorting, and grouping criteria in Blazor components. The article applies to components that support these features. The components that offer one or all of the functionalities are: -* [Components that [expose an `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping. +* Components that [expose an `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping. * [Filter]({%slug filter-overview%}) * [Gantt]({%slug gantt-overview%}) * [TreeList]({%slug treelist-overview%}) @@ -44,8 +44,9 @@ async Task OnReadHandler(...ReadEventArgs args) } ```` -#### Through the Component State -Use the component state property of the `OnStateChanged` event argument. For example: +### Through the Component State + +Use the component state property of the `OnStateChanged` event argument. This approach is applicable for the Gantt, the Grid and the TreeList, because they expose the state feature. For example: ````CS async Task OnStateChangedHandler(GridStateEventArgs args) @@ -68,21 +69,21 @@ async Task OnStateChangedHandler(GridStateEventArgs args) } ```` -At the bottom of the article you will find full examples. +See full examples at the bottom of the article. ## Filtering -The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`: +The filtering criteria for each filtered field are stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`: -* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast each `IFilterDescriptor` to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). +* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). * Otherwise, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). ### CompositeFilterDescriptor The `CompositeFilterDescriptor` exposes: -* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. +* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`. * [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: @@ -97,7 +98,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get ## Searching -The searching criteria are stored in an individual `IFilterDescriptor`. To access the filtering criteria, cast the `IFilterDescriptor` to `CompositeFilterDescriptor`. The `FilterDescriptors` property of the `CompositeFilterDescriptor` gets filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is OR. +The searching criteria in a Grid or TreeList are stored in an individual `IFilterDescriptor`. Cast it to [`CompositeFilterDescriptor`](#compositefilterdescriptor). The `CompositeFilterDescriptor` holds one child `FilterDescriptor`s for each searchable string column. Each `FilterDescriptor` has the same `Value`, which is the user search input. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is `Or`. ## Sorting @@ -112,9 +113,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. -## Examples +## Example with OnRead Event Handler -#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor in the OnRead Event Handler +You can obtain the FilterDescriptor, SortDescriptor, GroupDescriptor in the `OnRead` event handler. ````CSHTML @using Telerik.DataSource @@ -204,7 +205,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui } ```` -#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor Through the Component State +## Example with Component State + +You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor through the component state. ````CSHTML @using System.Text.Json diff --git a/components/autocomplete/events.md b/components/autocomplete/events.md index 708f7ec832..f0b4534d91 100644 --- a/components/autocomplete/events.md +++ b/components/autocomplete/events.md @@ -116,15 +116,15 @@ from model: @Role ## OnRead -You can use the he [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug autocomplete-virtualization%})). The event fires when: +You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug autocomplete-virtualization%})). The event fires when: -* the component initializes -* the user [filters]({%slug autocomplete-filter%}) -* the user scrolls with [virtualization]({%slug autocomplete-virtualization%}) enabled +* The component initializes. +* The user [filters]({%slug autocomplete-filter%}). +* The user scrolls with [virtualization]({%slug autocomplete-virtualization%}) enabled. You can also call remote data through async operations. -Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}). When using `OnRead`, make sure to set `TItem` and `TValue`. diff --git a/components/autocomplete/filter.md b/components/autocomplete/filter.md index 26b607cd05..bbe3ff22e2 100644 --- a/components/autocomplete/filter.md +++ b/components/autocomplete/filter.md @@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is You can also use the [`OnRead` event]({%slug autocomplete-events%}#onread) to: * Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). -* Implement custom (server) filtering and set a data source dynamically. +* Implement custom (server) filtering and set data dynamically. ## Filter Operator diff --git a/components/combobox/events.md b/components/combobox/events.md index 5a82ca6403..909400e3a2 100644 --- a/components/combobox/events.md +++ b/components/combobox/events.md @@ -177,13 +177,13 @@ See the [ComboBox Overview - Selected Item]({%slug components/combobox/overview% You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug combobox-virtualization%})). The event fires when: -* the component initializes -* the user [filters]({%slug components/combobox/filter%}) -* the user scrolls with [virtualization]({%slug combobox-virtualization%}) enabled +* The component initializes. +* The user [filters]({%slug components/combobox/filter%}). +* The user scrolls with [virtualization]({%slug combobox-virtualization%}) enabled. You can also call remote data through `async` operations. -Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}). When using `OnRead`, make sure to set `TItem` and `TValue`. diff --git a/components/combobox/filter.md b/components/combobox/filter.md index efb95a2f0e..87c86fbb33 100644 --- a/components/combobox/filter.md +++ b/components/combobox/filter.md @@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is You can also use the [`OnRead` event]({%slug components/combobox/events%}#onread) to: * Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). -* Implement custom (server) filtering and set a data source dynamically. +* Implement custom (server) filtering and set data dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/dropdownlist/events.md b/components/dropdownlist/events.md index 69840f232b..b99de72c78 100644 --- a/components/dropdownlist/events.md +++ b/components/dropdownlist/events.md @@ -101,11 +101,11 @@ from the model: @MySelectedItem You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug dropdownlist-virtualization%})). The event fires when: -* the component initializes -* the user [filters]({%slug components/dropdownlist/filter%}) -* the user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled. +* The component initializes. +* The user [filters]({%slug components/dropdownlist/filter%}). +* The user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled. -Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}). You can also call remote data through `async` operations. diff --git a/components/dropdownlist/filter.md b/components/dropdownlist/filter.md index 3c5826dc60..210b97bdd5 100644 --- a/components/dropdownlist/filter.md +++ b/components/dropdownlist/filter.md @@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is You can also use the [`OnRead` event]({%slug components/dropdownlist/events%}#onread) to: * Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). -* Implement custom (server) filtering and set a data source dynamically. +* Implement custom (server) filtering and set data dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/gantt/gantt-tree/filter/overview.md b/components/gantt/gantt-tree/filter/overview.md index a5e9114aee..068927d143 100644 --- a/components/gantt/gantt-tree/filter/overview.md +++ b/components/gantt/gantt-tree/filter/overview.md @@ -26,12 +26,11 @@ You can filter more than one column at a time, and all filter rules will be appl ## Filter Descriptors -The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). +You can get the applied filtering criteria for each filtered field. Use the [Gantt state]({%slug gantt-state%}) to obtain the user input, the filter operator and other filtering properties. Find out how in the [Data Operation Descriptors article]({%slug common-features-descriptors%}#filtering). ## Customize The Filter Editors -You can customize the editors rendered in the Gantt -by providing the `FilterEditorType` attribute, exposed on the ``. The `FilterEditorType` attribute accepts a member of the `GanttTreeListFilterEditorType` enum: +You can customize the editors rendered in the Gantt by providing the `FilterEditorType` attribute, exposed on the ``. The `FilterEditorType` attribute accepts a member of the `GanttTreeListFilterEditorType` enum: | Field data type | GanttTreeListFilterEditorType enum members | |-----------------|------------------------------------------| diff --git a/components/gantt/state.md b/components/gantt/state.md index 0f7cab717f..0d9f88bcf3 100644 --- a/components/gantt/state.md +++ b/components/gantt/state.md @@ -564,7 +564,7 @@ Sometimes you may want to know what the user changed in the Gantt (e.g., when th Find out what the user changed in the Gantt through the `PropertyName` of the `GanttStateEventArgs`. Override the user action by changing and then setting your desired state. -Find out how to [get the applied by the user filtering and sorting criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and sorting criteria]({%slug common-features-descriptors%}). >caption Know when the Gantt state changes, which parameter changes, and amend the change diff --git a/components/grid/filter/overview.md b/components/grid/filter/overview.md index 2809a6cea7..00eaa16965 100644 --- a/components/grid/filter/overview.md +++ b/components/grid/filter/overview.md @@ -37,7 +37,7 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter% ## Filter Descriptors -The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). +You can get the applied filtering criteria for each filtered field. Use the [Grid state]({%slug grid-state%}) or the [Grid `OnRead` event handler]({%slug grid-events%}#read-event) to obtain the user input, the filter operator and other filtering properties. Find out how in the [Data Operation Descriptors article]({%slug common-features-descriptors%}#filtering). ## Custom Filtering diff --git a/components/grid/state.md b/components/grid/state.md index dcecde4997..2787cc40a4 100644 --- a/components/grid/state.md +++ b/components/grid/state.md @@ -176,7 +176,7 @@ Here is some additional information about certain `PropertyName` values: To observe the changes in the Grid state more easily, copy and run the following example in a local app and at full screen. -Find out how to [get the applied by the user filtering, sorting and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering, sorting and grouping criteria]({%slug common-features-descriptors%}). >caption Using Grid OnStateChanged diff --git a/components/multicolumncombobox/events.md b/components/multicolumncombobox/events.md index 80c2bb0dd7..171a7acbac 100644 --- a/components/multicolumncombobox/events.md +++ b/components/multicolumncombobox/events.md @@ -200,13 +200,13 @@ See the [MultiColumnComboBox Overview - Selected Item]({%slug multicolumncombobo You can use the `OnRead` event to provide data to the component according to some custom logic, the user input, or the current [virtual scroll]({%slug multicolumncombobox-virtualization%}) position. The event fires when: -* the component initializes -* the user [filters]({%slug multicolumncombobox-filter%}) -* the user scrolls with [virtualization]({%slug multicolumncombobox-virtualization%}) enabled +* The component initializes. +* The user [filters]({%slug multicolumncombobox-filter%}). +* The user scrolls with [virtualization]({%slug multicolumncombobox-virtualization%}) enabled. You can also call remote data through `async` operations. -Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied by filtering and grouping criteria]({%slug common-features-descriptors%}). When using `OnRead`, make sure to set `TItem` and `TValue`. diff --git a/components/multicolumncombobox/filter.md b/components/multicolumncombobox/filter.md index 20336a8855..dedfa3260a 100644 --- a/components/multicolumncombobox/filter.md +++ b/components/multicolumncombobox/filter.md @@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is You can also use the [`OnRead` event]({%slug multicolumncombobox-events%}#onread) to: * Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). -* Implement custom (server) filtering and set a data source dynamically. +* Implement custom (server) filtering and set data dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/multiselect/events.md b/components/multiselect/events.md index 75a3928e20..ab58a1ed50 100644 --- a/components/multiselect/events.md +++ b/components/multiselect/events.md @@ -98,13 +98,13 @@ from the model: You can use the he [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug multiselect-virtualization%})). The event fires when: -* the component initializes -* the user [filters]({%slug multiselect-filter%}) -* the user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled +* The component initializes. +* The user [filters]({%slug multiselect-filter%}). +* The user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled. You can also call remote data through async operations. -Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}). >caption Custom Data according to the user input in the MultiSelect diff --git a/components/multiselect/filter.md b/components/multiselect/filter.md index 5964638533..0cdd747b4b 100644 --- a/components/multiselect/filter.md +++ b/components/multiselect/filter.md @@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is You can also use the [`OnRead` event]({%slug multiselect-events%}#onread) to: * Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event). -* Implement custom (server) filtering and set a data source dynamically. +* Implement custom (server) filtering and set data dynamically. Filtering looks in the `TextField`, and the filter is reset when the dropdown closes. diff --git a/components/treelist/filter/overview.md b/components/treelist/filter/overview.md index c441fdc1cc..9d2f4f7713 100644 --- a/components/treelist/filter/overview.md +++ b/components/treelist/filter/overview.md @@ -44,7 +44,7 @@ In addition to the two main filtering modes, the treelist offers two more featur ## Filter Descriptors -The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering). +You can get the applied filtering criteria for each filtered field. Use the [TreeList state]({%slug treelist-state%}) to obtain the user input, the filter operator and other filtering properties. Find out how in the [Data Operation Descriptors article]({%slug common-features-descriptors%}#filtering). ## Customize The Filter Editors diff --git a/components/treelist/state.md b/components/treelist/state.md index 92a261291b..c8b78c52d5 100644 --- a/components/treelist/state.md +++ b/components/treelist/state.md @@ -537,7 +537,7 @@ Sometimes you may want to know what the user changed in the TreeList (e.g., when The example below shows how to achieve it by using the`OnStateChanged` event. -Find out how to [get the applied by the user filtering and sorting criteria]({%slug common-features-descriptors%}). +Find out how to [get the applied filtering and sorting criteria]({%slug common-features-descriptors%}). >caption Know when the TreeList state changes, which parameter changed and amend the change From 90c20baf9d0d99f57eb1e2ad002bc5c0a3556560 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Tue, 22 Oct 2024 16:53:15 +0300 Subject: [PATCH 13/25] update after support review --- common-features/data-binding/descriptors.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 58ea47db47..13b890fe99 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -74,10 +74,10 @@ See full examples at the bottom of the article. ## Filtering -The filtering criteria for each filtered field are stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`: +The `args.Request.Filters` and the `args....State.FilterDescriptors` are collections of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor` from the respective collection: * If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). -* Otherwise, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). +* Otherwise, cast each `IFilterDescriptor` from the `args.Request.Filters` collection, respectively from the `args....State.FilterDescriptors` collection, to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). ### CompositeFilterDescriptor @@ -103,14 +103,15 @@ The searching criteria in a Grid or TreeList are stored in an individual `IFilte ## Sorting -The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor) objects. Each `SortDescriptor` instance gives access to: +The sorting criteria in a Grid, TreeList or Gantt are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor) objects. Each `SortDescriptor` instance gives access to: * The `Member`—The field where the user sorts. * The `SortDirection`—The sort direction for this sort descriptor. +When the [`SortMode`](/blazor-ui/api/Telerik.Blazor.SortMode) is `Multiple`, you may need to consider the order of the `SortDescriptor` instances. The first applied sorting criteria take precedence over all others. If there are equal values in the first sorted items, then those items are sorted by the following sorting criteria. ## Grouping -Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. +Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. The user may group by multiple fields. The groups for subsequent fields will be nested within their parent groups. The grouping criteria from the parent group are stored in the first `GroupDescriptor` instance from the collection. ## Example with OnRead Event Handler @@ -319,4 +320,4 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescript public bool Discontinued { get; set; } } } -```` +```` \ No newline at end of file From 7321d4a7642c119286e1c415a3057d85421bffa0 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:58:27 +0300 Subject: [PATCH 14/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 13b890fe99..258491aff4 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -20,7 +20,10 @@ This article explains how to retrieve the applied filtering, searching, sorting, ## Get Sort, Filter, Group, and Search Descriptors -There are two ways to obtain the applied filtering, searching, sorting, grouping criteria: +You can obtain the applied filtering, searching, sorting, and grouping criteria in two ways: + +* [Through the OnRead Event](#through-the-onread-event) +* [Through the Component's State](#through-the-component-state) ### Through the OnRead Event From a6593294c7c2f079412acb3913cbf6a3c023cf9f Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:58:41 +0300 Subject: [PATCH 15/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 258491aff4..ebbb9303ca 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -32,7 +32,7 @@ Use the [`Request` property]({%slug common-features-data-binding-onread%}#event- ````CS async Task OnReadHandler(...ReadEventArgs args) { - // Get the applied filtering and searching criteria + // Get the applied filtering and searching criteria. // args.Request.Filters // Get the applied grouping criteria, including: From 567041164ce0906c0313378000aeb5fef1caaab1 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:58:56 +0300 Subject: [PATCH 16/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index ebbb9303ca..4e5b4607ee 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -49,7 +49,7 @@ async Task OnReadHandler(...ReadEventArgs args) ### Through the Component State -Use the component state property of the `OnStateChanged` event argument. This approach is applicable for the Gantt, the Grid and the TreeList, because they expose the state feature. For example: +Use the component's state property of the `OnStateChanged` event argument. This approach applies to the Gantt, Grid, and TreeList because they expose the state feature. For example: ````CS async Task OnStateChangedHandler(GridStateEventArgs args) From 697565518f952bc1fd0e39273f9c0df30c8ebe49 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:59:23 +0300 Subject: [PATCH 17/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 4e5b4607ee..7ff45e4f5d 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -86,7 +86,7 @@ The `args.Request.Filters` and the `args....State.FilterDescriptors` are collect The `CompositeFilterDescriptor` exposes: -* [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`. +* The [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria, cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`. * [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: From 41e44eb640a718eb9461e5a561886c2ae1125479 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:59:37 +0300 Subject: [PATCH 18/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 7ff45e4f5d..730364e957 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -87,7 +87,7 @@ The `args.Request.Filters` and the `args....State.FilterDescriptors` are collect The `CompositeFilterDescriptor` exposes: * The [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria, cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`. -* [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. +* The [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: From 9c179da6aedfbe283336da9fe3cfcc386d57ba97 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:00:04 +0300 Subject: [PATCH 19/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 730364e957..c0657444ce 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -89,7 +89,7 @@ The `CompositeFilterDescriptor` exposes: * The [`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria, cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`. * The [`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection. -When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode: +When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values depending on the filter mode: @[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) From d149edf692d5ff00ffa152577e1fc8c156503b4b Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:00:58 +0300 Subject: [PATCH 20/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index c0657444ce..07183d1bda 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -211,7 +211,7 @@ You can obtain the FilterDescriptor, SortDescriptor, GroupDescriptor in the `OnR ## Example with Component State -You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor through the component state. +You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDescriptor through the component's state. ````CSHTML @using System.Text.Json From 558fe87f93da4eacd1b55d8e66f7714569d4a0c0 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:52:46 +0300 Subject: [PATCH 21/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 07183d1bda..1abfa3dc38 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -101,7 +101,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get ## Searching -The searching criteria in a Grid or TreeList are stored in an individual `IFilterDescriptor`. Cast it to [`CompositeFilterDescriptor`](#compositefilterdescriptor). The `CompositeFilterDescriptor` holds one child `FilterDescriptor`s for each searchable string column. Each `FilterDescriptor` has the same `Value`, which is the user search input. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is `Or`. +The searching criteria in a Grid or TreeList are stored in an individual `IFilterDescriptor`. Cast it to [`CompositeFilterDescriptor`](#compositefilterdescriptor). The `CompositeFilterDescriptor` holds one child `FilterDescriptor` for each searchable string column. Each `FilterDescriptor` has the same `Value`, which is the user's search input. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is `OR`. ## Sorting From ba892a32d861eb5fbb69424864ef7dd9c903a849 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:54:18 +0300 Subject: [PATCH 22/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 1abfa3dc38..5b52e93176 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -96,7 +96,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get | Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | | --- | --- | --- | | FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | -| FilterRow | Two filter descriptor instances per each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | +| `FilterRow` | Two filter descriptor instances for each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | ## Searching From d1b3e226acd6fe4f2b2b355e20ca36e97cd87db2 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:54:43 +0300 Subject: [PATCH 23/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 5b52e93176..f9a5da8b57 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -95,7 +95,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get | Filter Mode | FilterDescriptors Property Value | LogicalOperator Property Value | | --- | --- | --- | -| FilterMenu | Two filter descriptor instances per each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu then this filter descriptor instance `Value` is null. | Depending on the user choice. | +| `FilterMenu` | Two filter descriptor instances for each filtered field. Each filter descriptor instance gets the user input as `Value`. If there is no user input in one of the input fields in the menu, then this filter descriptor instance `Value` is null. | Depending on the user's choice. | | `FilterRow` | Two filter descriptor instances for each filtered field. The second filter descriptor instance always gets null as `Value`, because there is no second input field. | AND | From cf0102d0b951f6e27360cc92456d58d3b1c94df4 Mon Sep 17 00:00:00 2001 From: NansiYancheva <106161782+NansiYancheva@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:55:13 +0300 Subject: [PATCH 24/25] Update common-features/data-binding/descriptors.md Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com> --- common-features/data-binding/descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index f9a5da8b57..73faf46e7e 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -119,7 +119,7 @@ When the [`SortMode`](/blazor-ui/api/Telerik.Blazor.SortMode) is `Multiple`, you ## Example with OnRead Event Handler -You can obtain the FilterDescriptor, SortDescriptor, GroupDescriptor in the `OnRead` event handler. +You can obtain the FilterDescriptor, SortDescriptor, and GroupDescriptor in the `OnRead` event handler. ````CSHTML @using Telerik.DataSource From b450f30017a083ee8aa41ad4d63b91853f2f21e8 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Tue, 22 Oct 2024 18:55:46 +0300 Subject: [PATCH 25/25] update after tech writer review --- common-features/data-binding/descriptors.md | 63 +++++++++++++-------- components/autocomplete/events.md | 2 +- components/combobox/events.md | 2 +- components/dropdownlist/events.md | 2 +- 4 files changed, 43 insertions(+), 26 deletions(-) diff --git a/common-features/data-binding/descriptors.md b/common-features/data-binding/descriptors.md index 73faf46e7e..96883ecd8b 100644 --- a/common-features/data-binding/descriptors.md +++ b/common-features/data-binding/descriptors.md @@ -36,17 +36,19 @@ async Task OnReadHandler(...ReadEventArgs args) // args.Request.Filters // Get the applied grouping criteria, including: - // *the field by which the user groups - // *the sort direction of the groups ordering + // *The field by which the user groups. + // *The sort direction of the groups ordering. // args.Request.Groups // Get the applied sorting criteria, including: - // *the field which the user sorts - // *the sort direction + // *The field which the user sorts. + // *The sort direction. // args.Request.Sorts } ```` +See the [complete example](#example-with-onread-event-handler) at the bottom of the article. + ### Through the Component State Use the component's state property of the `OnStateChanged` event argument. This approach applies to the Gantt, Grid, and TreeList because they expose the state feature. For example: @@ -54,32 +56,32 @@ Use the component's state property of the `OnStateChanged` event argument. This ````CS async Task OnStateChangedHandler(GridStateEventArgs args) { - // Get the applied filtering criteria + // Get the applied filtering criteria. // args.GridState.FilterDescriptors - // Get the applied searching criteria + // Get the applied searching criteria. // args.GridState.SearchFilter // Get the applied grouping criteria, including: - // *the field by which the user groups - // *the sort direction of the groups ordering + // *The field by which the user groups. + // *The sort direction of the groups ordering. // args.GridState.GroupDescriptors // Get the applied sorting criteria, including: - // *the field which the user sorts - // *the sort direction + // *The field which the user sorts. + // *The sort direction. // args.GridState.SortDescriptors } ```` -See full examples at the bottom of the article. +See the [complete example](#example-with-component-state) at the bottom of the article. ## Filtering The `args.Request.Filters` and the `args....State.FilterDescriptors` are collections of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor` from the respective collection: -* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). +* If the component is of type input or select, such as the AutoComplete, ComboBox, DropDownList, MultiColumnComboBox, MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor). * Otherwise, cast each `IFilterDescriptor` from the `args.Request.Filters` collection, respectively from the `args....State.FilterDescriptors` collection, to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). ### CompositeFilterDescriptor @@ -109,12 +111,15 @@ The searching criteria in a Grid or TreeList are stored in an individual `IFilte The sorting criteria in a Grid, TreeList or Gantt are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor) objects. Each `SortDescriptor` instance gives access to: * The `Member`—The field where the user sorts. * The `SortDirection`—The sort direction for this sort descriptor. + When the [`SortMode`](/blazor-ui/api/Telerik.Blazor.SortMode) is `Multiple`, you may need to consider the order of the `SortDescriptor` instances. The first applied sorting criteria take precedence over all others. If there are equal values in the first sorted items, then those items are sorted by the following sorting criteria. ## Grouping -Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. The user may group by multiple fields. The groups for subsequent fields will be nested within their parent groups. The grouping criteria from the parent group are stored in the first `GroupDescriptor` instance from the collection. +Тhe grouping criteria for each group are stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor) objects. The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class. + +The user may group by multiple fields. The groups for subsequent fields will be nested within their parent groups. The grouping criteria from the parent group are stored in the first `GroupDescriptor` instance from the collection. ## Example with OnRead Event Handler @@ -147,13 +152,13 @@ You can obtain the FilterDescriptor, SortDescriptor, and GroupDescriptor in the @code { - private MarkupString ConsoleSim { get; set; } // to showcase what you get + private MarkupString ConsoleSim { get; set; } //To showcase what you get. private async Task OnReadHandler(GridReadEventArgs args) { string output = string.Empty; - //get the filtering and searching criteria + //Get the filtering and searching criteria. output += "FILTERS:
"; foreach (var item in args.Request.Filters) { @@ -169,14 +174,14 @@ You can obtain the FilterDescriptor, SortDescriptor, and GroupDescriptor in the } } - //get the sorting criteria + //Get the sorting criteria. output += "SORTS:
"; foreach (SortDescriptor item in args.Request.Sorts) { output += $"Sorted field: {item.Member}, Sort direction: {item.SortDirection}
"; } - //get the grouping criteria + //Get the grouping criteria. output += "GROUPS:
"; foreach (GroupDescriptor item in args.Request.Groups) { @@ -246,7 +251,7 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDesc { string output = string.Empty; - //get the searching criteria + //Get the searching criteria. output += "SEARCHING:
"; var searching = args.GridState.SearchFilter; @@ -254,7 +259,6 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDesc { CompositeFilterDescriptor currSearch = searching as CompositeFilterDescriptor; output += $"START nested searching: Logical operator: {currSearch.LogicalOperator}, details:
"; - // by design, there will actually be 2 only, this showcases the concept and the types foreach (FilterDescriptor nestedSearch in currSearch.FilterDescriptors) { output += $"Search field: {nestedSearch.Member}, Search operator {nestedSearch.Operator}, Search value: {nestedSearch.Value}
"; @@ -263,7 +267,7 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDesc } - //get the filtering criteria + //Get the filtering criteria. output += "FILTERS:
"; foreach (var item in args.GridState.FilterDescriptors) @@ -280,14 +284,14 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDesc } } - //get the sorting criteria + //Get the sorting criteria. output += "SORTS:
"; foreach (SortDescriptor item in args.GridState.SortDescriptors) { output += $"Sorted field: {item.Member}, Sort direction: {item.SortDirection}
"; } - //get the grouping criteria + //Get the grouping criteria. output += "GROUPS:
"; foreach (SortDescriptor item in args.GridState.GroupDescriptors) { @@ -323,4 +327,17 @@ You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, and GroupDesc public bool Discontinued { get; set; } } } -```` \ No newline at end of file +```` + +## See Also + +* [AutoComplete OnRead Event]({%slug autocomplete-events%}#onread) +* [ComboBox OnRead Event]({%slug components/combobox/events%}#onread) +* [DropDownList OnRead Event]({%slug components/dropdownlist/events%}#onread) +* [Filter Overview]({%slug filter-overview%}) +* [Gantt State]({%slug gantt-state%}) +* [Grid OnRead Event]({%slug components/grid/manual-operations%}) +* [Grid State]({%slug grid-state%}) +* [MultiColumnComboBox OnRead Event]({%slug multicolumncombobox-events%}#onread) +* [MultiSelect OnRead Event]({%slug multiselect-events%}#onread) +* [TreeList State]({%slug treelist-state%}) \ No newline at end of file diff --git a/components/autocomplete/events.md b/components/autocomplete/events.md index f0b4534d91..f30fb44820 100644 --- a/components/autocomplete/events.md +++ b/components/autocomplete/events.md @@ -116,7 +116,7 @@ from model: @Role ## OnRead -You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug autocomplete-virtualization%})). The event fires when: +You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using [virtualization]({%slug autocomplete-virtualization%})). The event fires when: * The component initializes. * The user [filters]({%slug autocomplete-filter%}). diff --git a/components/combobox/events.md b/components/combobox/events.md index 909400e3a2..c4ea813724 100644 --- a/components/combobox/events.md +++ b/components/combobox/events.md @@ -175,7 +175,7 @@ See the [ComboBox Overview - Selected Item]({%slug components/combobox/overview% ## OnRead -You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug combobox-virtualization%})). The event fires when: +You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using [virtualization]({%slug combobox-virtualization%})). The event fires when: * The component initializes. * The user [filters]({%slug components/combobox/filter%}). diff --git a/components/dropdownlist/events.md b/components/dropdownlist/events.md index b99de72c78..2f39a00954 100644 --- a/components/dropdownlist/events.md +++ b/components/dropdownlist/events.md @@ -99,7 +99,7 @@ from the model: @MySelectedItem ## OnRead -You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug dropdownlist-virtualization%})). The event fires when: +You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using [virtualization]({%slug dropdownlist-virtualization%})). The event fires when: * The component initializes. * The user [filters]({%slug components/dropdownlist/filter%}).