Sftextbox not working When binding from Model

I have  have added textbox in blazor application.When I bind textbox value to model .It shows an below error message.Please check this message and advise how to solve this issue

Severity Code Description Project File Line Suppression State
Error The attribute names could not be inferred from bind attribute 'bind-Value'. Bind attributes should be of the form 'bind' or 'bind-value' along with their corresponding optional parameters like 'bind-value:event', 'bind:format' etc. SampleProject.Client D:\Blazor\Sample\SampleProject\SampleProject\Client\Pages\SupplierPage.razor 17

note:-

I have added s"yncfusion.Blazor 18.4.0.49" Package in my solution from nutget.

I haved added "@using Syncfusion.Blazor" in Import.razor file.


code:-

@page "/Supplier"

@inherits SupplierPagBase


<h3>Supplier</h3>

@if (mode != FormModes.List)
{
    @if (model != null)
    {
        <EditForm Model="@model" OnValidSubmit="@SaveData">
            <DataAnnotationsValidator />
            <div class="form-row">
                <div class="form-group col-md-6">
                    <label class="col-form-label">First Name :</label>
                    <SfTextBox @bind-Value="@model.SupplierCode"></SfTextBox>
                    @*<ValidationMessage For="@(() => e.FirstName)"></ValidationMessage>*@
                </div>
                <div class="form-group col-md-6">
                    <label class="col-form-label">Last Name :</label>
                    <SfTextBox @bind-Value="@model.SupplierName"></SfTextBox>
                    <ValidationMessage For="@(() => model.SupplierName)"></ValidationMessage>
                </div>
            </div>
            
        </EditForm>
    }
}

@code {
    
    
}


6 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team March 31, 2021 08:09 AM UTC

Hi Ismail, 
  
Greetings from Syncfusion support. 
  
We have checked the provided code example in the mentioned Syncfusion product version. The reported issue is not occurred at our end. We suspect that the reported issue may be caused due to missing of import the @using Syncfusion.Blazor.Inputs namespace in the application.  
  
Kindly refer the sample attached below. 
  
Regards, 
Berly B.C 



KI KINS March 31, 2021 04:45 PM UTC

I have modified my source code as per given example from below link but Still I am getting the same issue.Please check attached source code and advise how to resolve this issue

Attachment: SampleProject_ccdef847.zip


KI KINS April 1, 2021 02:14 AM UTC

Re-attaching my sample code.

Please check "SampleProject\SampleProject\Client\Pages\SupplierPage.razor" file

Attachment: SampleProject_5a238bcb.zip


BC Berly Christopher Syncfusion Team April 1, 2021 02:26 PM UTC

Hi Ismail, 
  
Thanks for sharing the enough information to us. 
  
While checking the shared sample, you have installed both “Syncfusion.Blazor” and “Syncfusion.Blazor.Calendars” package in the application. But, Syncfusion.Blazor.Calendars will be available under the Syncfusion.Blazor namespace. Also, you have missed to import the “Syncfusion.Blazor.Inputs” namespace in the “_Imports.razor” file. Kindly refer the below code example. 
  
  
@using Syncfusion.Blazor 
@using Syncfusion.Blazor.Inputs 
@using Syncfusion.Blazor.Calendars 
 
  
  
Regards, 
Berly B.C 


Marked as answer

KI KINS April 2, 2021 01:17 AM UTC

thanks working fine now....


SN Sevvandhi Nagulan Syncfusion Team April 2, 2021 05:05 AM UTC

Hi Ismail, 


We are glad to hear that the reported issue has been resolved. Please get back to us if you need further assistance. 


Regards, 
Sevvandhi N 


Loader.
Up arrow icon