Completed
Last Updated: 03 Jul 2025 11:13 by ADMIN
Dale
Created on: 01 Jul 2025 13:09
Category: UI for Blazor
Type: Bug Report
0
'TelerikFilter.ValueChanged' is obsolete: 'Use OnUpdate instead.'

I've noticed this warning is now shown since version 9.0.0. I checked the release notes and don't see any notes reflecting this change. I also checked the documentation and don't see any information about the OnUpdate event. Can we please update the documentation to document the changes? I would like to understand the behavior of OnUpdate so I can move away from ValueChanged.

"warning CS0618: 'TelerikFilter.ValueChanged' is obsolete: 'Use OnUpdate instead.'"

Blazor Filter Events - Telerik UI for Blazor

1 comment
ADMIN
Tsvetomir
Posted on: 03 Jul 2025 11:13

Hello Dale,

I've reviewed the described behavior and must admit that it is omitted from being documented. From version 9.0.0, as you've already noticed, a new OnUpdate event has been introduced, which is the recommended way to track updates on Filter value changes. In short, in our latest version, the Filter component works directly with the object reference of the bound CompositeFilterDescriptor. In other words, the component updates its value internally and does not require any manual updates.

Here I've prepared a basic example that demonstrates the usage of the OnUpdate event:

@using Telerik.DataSource
<div class="info-note">Change any filter value to trigger the event and see the message update from the OnUpdate handler.</div>
<TelerikFilter Value="@Value" OnUpdate="@OnFilterUpdate">
    <FilterFields>
        <FilterField Name="@(nameof(Person.EmployeeId))" Type="@(typeof(int))" Label="Id"></FilterField>
        <FilterField Name="@(nameof(Person.Name))" Type="@(typeof(string))" Label="First Name"></FilterField>
        <FilterField Name="@(nameof(Person.AgeInYears))" Type="@(typeof(int))" Label="Age"></FilterField>
    </FilterFields>
</TelerikFilter>
<br />
<div>
    <strong>@EventMessage</strong>
</div>
<style>
    .info-note {
        background: #e6f4ff;
        padding: 10px;
        border-radius: 4px;
        margin-bottom: 10px;
        width: 400px;
    }
</style>
@code {
    private CompositeFilterDescriptor Value { get; set; } = new CompositeFilterDescriptor();
    private string EventMessage { get; set; } = string.Empty;
    private void OnFilterUpdate()
    {
        EventMessage = $"Filter updated at {DateTime.Now:HH:mm:ss}";
    }
    public class Person
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; } = string.Empty;
        public int AgeInYears { get; set; }
    }
}

As a next step from my side, I've added the missing documentation in the Filter Events article. The changes are already merged and probably will be available live until the end of the week. With that in mind, I'm changing the status of the item as "Completed".

Also, as a token of gratitude, I've awarded your account with Telerik Points. Thank you for pointing that out to us, your cooperation is highly valuable.

Regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.