Last Updated: 22 Apr 2021 20:34 by ADMIN
Release 2.24.0
Created on: 19 Apr 2021 19:26
Category: ComboBox
Type: Bug Report
Value binding in ComboBox doesn't work as expected in Blazor form, the pre-selected value is not displayed accordingly

Issue - Setting the selected element of a combo box inside a form worked in 2.22.0 and no longer works in 2.23.0 

Repo -

Steps to Reproduce 

  • In the test repo start the application and navigate to https://localhost:5001/updateWeather
  • The selected value in the combo box should be the 8th value, "summary 8"
  • Stop the application, in BlazorGrid.Client.csproj 
    • Replace <PackageReference Include="Telerik.UI.for.Blazor" Version="2.22.0" />
    • With <PackageReference Include="Telerik.UI.for.Blazor" Version="2.23.0" />
  • Do a clean/rebuild to ensure the latest version of Telerik Blazor is being used
  • Run the application in a new incognito window and navigate back to https://localhost:5001/updateWeather, notice how nothing is selected in the combo box



This is a contrived example pulled out of a larger application.  Almost all of our combo boxes are backed by OData calls.  When we 'create or POST' an element the first time we load the form we have the combo box make an OData call to retrieve the top 200 elements.  On a subsequent 'edit or PUT', where we have a thing we want to update we first go get the thing we want to work with, and then fill in the comobo box with that element.

In this example application we simulate this load by deciding if a value was passed in or not for the combo box.  https://localhost:5001/updateWeather always passes in an 8 to load the 8th element.  https://localhost:5001/createWeather does not pass in any value, leaving the form value unbound.

This all worked as expected in 2.22.0, however once we upgraded to 2.23.0 we could no longer set the value of the combo box on load when combined with an OData call.

1 comment
Hristian Stefanov
Posted on: 20 Apr 2021 14:13

Hello Ben,

Indeed after the upgrade (to 2.23.0), the value of the ComboBox in the form can no longer be set on the component initialize. Thank you for noticing and reporting!

By the way, I touched a little bit on the title of the requested bug for more clarity. I have already added your vote there because, this way, the priority of the requested bug is increased, and we are tracking this interest.

The bug fix is scheduled for the next release (2.24.0). Around mid-May. As a small thank you gesture, I've added some Telerik points to your account.

Hristian Stefanov
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.