- Home
- Forum
- ASP.NET Core - EJ 2
- Data bind
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!
SIGN IN To post a reply.
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
JS API reference: https://ej2.syncfusion.com/documentation/api/textbox
Let us know if you need any further assistance on this.
Regards,
Prince
TÁ
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"
placeholder="E-Mail"
floatLabelType="@FloatLabelType.Auto"
bind-value="@loginModel.Email"
>
</EjsTextBox>
</div>
<div class="col-md-12">
<EjsTextBox id="password" placeholder="Senha" Type="password" floatLabelType="@FloatLabelType.Auto" bind="@loginModel.Password"></EjsTextBox>
</div>
<div class="col-md-12">
<EjsMaskedTextBox id='cnpjEmpresa' mask='00.000.000/0000-00' bind="@loginModel.CnpjEmpresa"></EjsMaskedTextBox>
</div>
<button type="button" class="btn btn-lg btn-primary btn-block text-uppercase" style="margin-top:30px" onclick="@Clicado">Enviar</button>
</form>
</div>
</div>
</div>
</div>
<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"
placeholder="E-Mail"
floatLabelType="@FloatLabelType.Auto"
bind-value="@loginModel.Email"
>
</EjsTextBox>
</div>
<div class="col-md-12">
<EjsTextBox id="password" placeholder="Senha" Type="password" floatLabelType="@FloatLabelType.Auto" bind="@loginModel.Password"></EjsTextBox>
</div>
<div class="col-md-12">
<EjsMaskedTextBox id='cnpjEmpresa' mask='00.000.000/0000-00' bind="@loginModel.CnpjEmpresa"></EjsMaskedTextBox>
</div>
<button type="button" class="btn btn-lg btn-primary btn-block text-uppercase" style="margin-top:30px" onclick="@Clicado">Enviar</button>
</form>
</div>
</div>
</div>
</div>
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Á
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/
Regards,
Prince
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
TÁ Társis
- Mar 26, 2019 12:09 AM UTC
- Mar 28, 2019 06:21 AM UTC