I would like to be able to override the No Data message in DropDownList component when there are no elements in the Data.
--
ADMIN EDIT
Until this feature is implemented, here is a workaround.
If you already have localization in your project, just set "DropDownList_NoData" key to an empty string in your resources.
If you don't have localization, here are the steps you should do (shortened version of the documentation):
1. Create a class for your localizer:
public class SampleResxLocalizer : ITelerikStringLocalizer
{
public string this[string name]
{
get
{
return GetStringFromResource(name);
}
}
public string GetStringFromResource(string key)
{
// this will override only DropDownList_NoData message and it will return other messages as they are
if (key == nameof(Messages.DropDownList_NoData))
{
return string.Empty;
}
return Messages.ResourceManager.GetString(key, Messages.Culture); ;
}
}
2. Override the existing Localizer. This step should be done when configuring your services after calling "AddTelerikBlazor()":
builder.Services.AddSingleton(typeof(ITelerikStringLocalizer), typeof(SampleResxLocalizer));
--