Hi. I use the filtering function on the drop-down data grid input control, and when I type 3 Korean characters, It was 3 characters in the web assembly (Correct), but 5 characters in the server (Wrong). Is there any solution?
[Webassembly]
[Server]
Hi @Doyun_Kim ,
Blazor server probably has higher latency hence the delay during filtering. You can try setting the FilterDelay attribute (which is measured in milliseconds and the default is 500).
<RadzenDropDownDataGrid FilterDelay="500" ... />
Thanks but it is still not working.
Then it is probably the latency introduced by Blazor server. I am afraid we can't do much about that.
opened 02:01AM - 11 Jul 24 UTC
https://forum.radzen.com/t/dropdown-filtering-korean-characters-issue/16823/1
β¦
There was an issue with Dropdown filtering Korean characters. I saw a similar issue on the Radzen forum, but it has not been resolved.
I entered "νλλμ
", but the result is "νλλλλμΈμ
".
There is a bug in the SearchText @oninput of DropDown. Currently, the input tag is using both value and @oninput. Since .NET 7.0, there have been changes in the way two-way data binding works.

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-8.0#use-bindgetbindset-modifiers-and-avoid-event-handlers-for-two-way-data-binding
I also encountered the same issue and found that it can be fixed in .NET 7.0 by using " Use @bind:get
/@bind:set
modifiers and avoid event handlers for two-way data binding". I reported this on GitHub as an issue.
enchev
July 11, 2024, 5:03am
7
Hey @rlqja3514 ,
Can you point us to some of our examples where we can reproduce this? You can edit any example to try to replicate it.
Hi @enchev
To align with the provided link, change the <input>
tag's value and @oninput
to:
@bind:event="oninput" @bind:get="inputValue" @bind:set="OnInput"
Below is an example for testing this. "Search Filtering Error" is the code that causes an error, and "Search Filtering Success" is the working example. You can test by entering "νλλμ
" (Korean characters).
@page "/"
<div style="display:flex;flex-direction:column; width:300px;">
<h3>Search Filtering Error</h3>
<RadzenDropDown @bind-SearchText=SearchText
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" FilterOperator="StringFilterOperator.StartsWith" AllowFiltering="true"
Data=@SearchItems
@bind-Value=value Style="width: 100%; max-width: 400px;"
Name="DropDownFiltering" />
<input value="@inputValue" @oninput="OnInput" />
</div>
<h3>Search Filtering Success</h3>
<div style="display:flex;flex-direction:column; width:300px;">
<input @bind:event="oninput" @bind:get="inputValue" @bind:set="OnInput" />
<input @bind:event="oninput" @bind:get="inputValue" @bind:set="OnInput" @onchange="HandleChange" @onkeydown="OnFilterKeyPress" />
</div>
@code {
string SearchText;
string value;
private List<string> SearchItems = new List<string>
{
"νλ",
"νλλ",
"νλλμ
"
};
private string? inputValue;
private void OnInput(ChangeEventArgs args)
{
var newValue = args.Value?.ToString() ?? string.Empty;
inputValue = newValue;
}
private void OnInput(string value)
{
var newValue = value ?? string.Empty;
inputValue = newValue;
}
private void HandleChange(ChangeEventArgs e)
{
Console.WriteLine($"Input value changed on blur: {inputValue}");
}
private void OnFilterKeyPress(KeyboardEventArgs args)
{
if (args.Key == "Enter")
{
Console.WriteLine($"Enter pressed with value: {inputValue}");
// Perform any additional logic for Enter key press
}
}
}
Based on .NET 7.0, we changed the RazorLangVersion
to 7.0 and modified the input tag as follows:
<input aria-label="@SearchAriaLabel" id="@SearchID" @ref="@search" tabindex="@(Disabled ? "-1" : $"{TabIndex}")" placeholder="@FilterPlaceholder" class="rz-dropdown-filter rz-inputtext" autocomplete="off" aria-autocomplete="none" type="text"
@onchange="@((ChangeEventArgs args) => OnFilter(args))" @onkeydown="@((args) => OnFilterKeyPress(args))"
@bind:event="oninput" @bind:get="@searchText"
@bind:set=@(args => { searchText = $"{args}"; SearchTextChanged.InvokeAsync(searchText);}) />
<span class="rz-dropdown-filter-icon rzi rzi-search"></span>
We have confirmed that it works correctly with these changes.
enchev
July 11, 2024, 7:02am
10
Simply changing RazorLangVersion
to 7.0 and updating this code will not work since Radzen.Blazor supports older .NET versions as well. We will check how to handle this.
1 Like