Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Telerik Blazor TextBox Data Binding Issue

$
0
0

In my ASP.NET Core project's Blazor Web Assembly form, I'm trying to bind a value with a text box control with the below syntax. The issue with this is, sometimes it works and sometimes it doesn't.

In my OnInitialized method, I have instantiated the _action object properly so _action.Title is assigned to an empty string when the component is initialized. Now, when I try to enter value in the form control, the binding just doesn't work sometimes (note that I'm using 2-way data binding here).

If I use custom templates within FormItem, then only this issue comes (that too not always), otherwise not. Also, the floating label appears to get overlapped with the form control text when the issue happens. Is this an existing issue? How can this be fixed?

Note I'm using Telerik.UI.Blazor (5.1.1) package in my ASP.NET Core 8.0 project.

<FormItem Field="_action.Title"><Template><div class="k-form-field-wrap"><TelerikFloatingLabel Text="@Title" Class="@($"floating-label")"><TelerikTextBox Width="200px"                                    Id="actionTitle"                                    Name="actionTitleName"                                    @bind-Value="@_action.Title"></TelerikTextBox></TelerikFloatingLabel></div></Template></FormItem>

The code snippet that works:

<FormItem Field="@(_action.Title)" LabelText="@Title"></FormItem>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>