The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm not able to submit my form while the first dropdownlist of the model if filled, i've tested with others dropdownlist in the same position, and the issue always occurs with the first dropdownlist of the model,
Like:
If the field "Contract" is filled when i click submit, the screen returns top and focus field "Contract" while contract is empty i'm able to send the data.
Code :
@if (Model.Contracts != null)
{
@Html.EJS().DropDownListFor(model => model.Ticket.ContractSequentialId).Placeholder("Selecione um termo de compromisso da empresa").DataSource(Model.Contracts).Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "OportunityOmieDescription", Value = "SequentialId" }).CssClass("ddl-ticket").Render()
@Html.ValidationMessageFor(model => model.Ticket.ContractSequentialId, "", new { @class = "text-danger" })
VKVinoth Kumar Sundara Moorthy Syncfusion Team May 20, 2019 08:44 AM
Hi Werner,
Thank you for contactingSyncfusionsupport.
We have checked your shared code snippet and we found that youbindedthedatasourceusing model value and you have not posted the value. So, we suggest youto bindthe model value anddatasourceas like in the below code snippet to resolve this issue.
[HttpPost]
public ActionResult Index(Countries model) { model.ListItems = new Countries().CountriesList(); model.Value = model.Value; return View(model); }
Could you please check the above details and get back to us with more information (like complete code snippet or issue replicable sample with video demonstration)? Based on that we will validate and provide youthe bettersolution.
Regards,
Vinoth Kumar S
WMwerner mayerMay 21, 2019 02:36 PM
Hi, i think you send me the wrong project sample.
POPrince Oliver Syncfusion Team May 22, 2019 12:59 AM
Hello Werner,
Sorry for the inconvenience caused. Please find the proper project in the following link:
Please check the above example and get back to us if you have any issues in your end.
Regards,
Prince
WMwerner mayerMay 24, 2019 09:35 AM
I'm using asp.net.mvc, not core 2.1
My code:
https://codeshare.io/5zkQ3W
VKVinoth Kumar Sundara Moorthy Syncfusion Team May 27, 2019 12:41 PM
Hi Werner,
Good day to you
We have provided MVC application in our previous update. We have checked our provided sample and we can’t able to reproduce the reported issue at our end. Please check whether you have filled all the value before post. We have prepared the sample based onyourprovided codeand same can be downloaded from below link,
Could you please check the above sample and get back to usif still issue persistsin your end?
Regards,
Vinoth Kumar S
WMwerner mayerMay 27, 2019 02:17 PM
I solve the problem changin $("form:first").submit(); to document.forms[0].submit();
But i really don't know what difference it makes.
CIChristopher Issac Sunder K Syncfusion Team May 31, 2019 01:28 AM
Hi Werner,
Thanks for the update.
$("form:first").submit(); - $(“form:first”) returns the form element as object collection and first form elements you need to take $(“form:first”)[0].
document.forms[0] - document.forms[0] returns the form element directly. Because document.forms returns the object collection and document.forms[0] returns the first form element.
Please get back to us if you require any further assistance.