Requires a value for ValueExpression

I have a Telerik input component (such as a texbox, or an autocomplete, or a dropdown) working fine on a component in my app. When I use this component elsewhere (like in a modal in a form), it starts throwing errors.

Use two-way binding - the @bind-Value syntax if you can. If you need to handle the ValueChanged even to implement logic, see this article: How to handle the ValueChanged event and use forms and validation. It shows how to use the ValueExpression parameter and also hints at using the Telerik-specific OnChange event that does not prevent two-way binding.

Provide a ValueExpression to the component. This is a lambda function that tells the framework what field in the model to update. It is required by the framework when you cannot use @bind-Value, but the component is inside a form. The article in the previous point shows an example.

You may want to always provide a ValueExpression when expecting to reuse input components inside wrapped in a component. This makes them more likely to work when placed inside an EditForm from a parent component.

Move the EditForm inside the component that hosts all the input. This will make it throw the exception immediately, not only when used in a particular case. This will let you evaluate how to solve the situation according to the previous points, and can let you expose only relevant events/logic/parameters to its parents, instead of expecting them to provide a form and validator.

If you do not define a Value at all, consider whether such an input needs to be in the form in the first place (for example, putting an <InputText /> in an EditForm without defining the value and binding settings will throw the same error.

Support Resources

Sample Applications

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.