New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Troubleshooting
This article provides solutions to common issues that you might come across when leveraging the Telerik UI for ASP.NET Core DropDownList.
Items return as undefined when configuring the DropDownList for Remote Binding
By default, the ASP.NET Core predominantly configures the JSON property naming convetion for server responses to camelCase
. Where the DropDownList relies on PascalCase
formatted response instead.
The following example demonstrates the differences between the format of responses.
PascalCase
[
{
"Value": "1",
"Text": "Option1"
},
{
"Value": "2",
"Text": "Option2"
}
]
Solution
To handle Pascal-Cased formatted responses, alter the default JSON property naming convention by using the available JSON Serialization Options.
C#
builder.Services
.AddControllersWithViews()
.AddJsonOptions(options => {
options.JsonSerializerOptions.PropertyNamingPolicy = null;
});