We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Data bind

Good evening,

how can I bind a TextBox to a property? I'm not geting it done by the standart razor components way.

thanks in advance!

4 Replies

PO Prince Oliver Syncfusion Team March 26, 2019 09:43 AM UTC

Hello Társis, 

Greetings from Syncfusion support. 

Before you begin, make sure that you have followed the steps mentioned in the following Getting Started documentation section: https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/visual-studio-2017/  

Once the dependent scripts, themes and assembly files are registers in the application, you can render the control using either <input> element or using the tag helper. You can set the properties as shown below. 

<ejs-textbox id="firstname" placeholder="First Name" showClearButton="true" floatLabelType="Auto"></ejs-textbox> 

For further reference, please check the following links 

Let us know if you need any further assistance on this. 


Társis March 26, 2019 12:04 PM UTC

Thank you for your answer,

I think I wasn't clear about my question. I'm talking about razor components. So, I'm rendering the component like this:

<div class="row">
        <div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
            <div class="card card-signin my-5">
                <div class="card-body">
                    <h5 class="card-title text-center">Login</h5>
                    <form class="form-signin">

                        <div class="col-md-12">
                            <EjsTextBox id="email"
                        <div class="col-md-12">
                            <EjsTextBox id="password" placeholder="Senha" Type="password" floatLabelType="@FloatLabelType.Auto" bind="@loginModel.Password"></EjsTextBox>
                        <div class="col-md-12">
                            <EjsMaskedTextBox id='cnpjEmpresa' mask='00.000.000/0000-00' bind="@loginModel.CnpjEmpresa"></EjsMaskedTextBox>

                        <button type="button" class="btn btn-lg btn-primary btn-block text-uppercase" style="margin-top:30px" onclick="@Clicado">Enviar</button>


But bind= or bind-value doesn't work. It returns me in console the following answer: Object of type 'Syncfusion.EJ2.RazorComponents.Inputs.EjsTextBox' does not have a property matching the name 'valueChanged'.

loginModel is an object with the properties EMail, Password and CnpjEmpresa

Thanks in advance!

Társis March 28, 2019 01:03 AM UTC

Do you have some news?

PO Prince Oliver Syncfusion Team March 28, 2019 06:21 AM UTC

Hi Társis, 

Good day to you. 

Currently, we don’t have support for “Blazor data-bind model support for input components” in our end. We have planned to include this feature in our phase 2 Blazor implementation and it will be available in our upcoming 2019 Volume 1, SP1 release which is scheduled to be rolled out in the month of April 2019. You can now track the current status of your reported issue, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/5437/        


Live Chat Icon For mobile
Up arrow icon