Good morning,
I have an issue when I have applied the validation to the Dialog Template Form of the grid.
There is validation on the Contact Name, Contact Telephone and Contact Type as these are the required fields. The error messages appears, however, when text is entered in the input box the error message is not disappearing and it is blocking the other input boxes. I have attached a screenshot of this to show exactly what I mean.
I notice that there is a code segment to insert, however, I have placed this a couple of different places and it doesn't seem to work. I have attached my code for the Dialog Form Template for my grid and would fully appreciate if you could have a look and see where the issue lies.
Thanks,
Frankie
Hi Thavasianand S.
When I first load up the dialog template box there is no data in any of the fields. If I clicked submit the validation messages appear, if I then go and populate the fields with data the validation messages do not disappear once they are populated.
Its like the validation messages are stuck when they are visible and won't disappear which is subsequently blocking the view of other input boxes. We need the validation messages to disappear once the input box has been populated or filled in.
Thanks,
Frankie
1. Stack trace:
2. Upgraded to the latest Syncfusion MVC (15.3.0.33)
3. Upgraded to the latest jQuery (3.2.1)
<script id="CreateNewContact" type="text/template">
<form id="ContactForm">
----
</form>
</script>
|
<script id="CreateNewContact" type="text/template">
<div class="container">
<div class="row">
<div class="e-rowcell">
---
</div>
</div>
<div class="row">
<div class="e-rowcell">
---
</div>
</div>
<div class="row">
<div class="e-rowcell">
---
</div>
</div>
<div class="row">
<div class="e-rowcell">
---
</div>
</div>
</div>
</script>
|
@(Html.EJ().Grid<object>("FlatGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
---
.AllowPaging()
.Columns(col =>
{
---
})
.ClientSideEvents(eve => { eve.ActionComplete("complete"); })
)
</div>
<script type="text/javascript">
function complete(args) {
if ((args.requestType == "beginedit" || args.requestType == "add") && args.model.editSettings.editMode == "dialogtemplate") {
if (args.requestType == "add" || args.requestType == "beginedit") {
//Set Syncfusion Inputs
$("#OrderID").ejMaskEdit({
width: "100%", height: "42px", htmlAttributes: { name: "OrderID" },
change: function validatemsgRemove(e) {
this.wrapper.next().css('display', 'none'); // remove the validation message
}
});
----
}
</script>
|
Hi Thavasianand S.
Thanks for that! The validation messages are disappearing now when I input text into the input boxes.
One last question, you seem to have solved all but 1 of the console errors. I am still getting this one:
Any ideas how to solve this one?
Much appreciated
Thanks,
Frankie
@(Html.EJ().Grid<object>("FlatGrid")
// .Datasource((IEnumerable<object>)ViewBag.datasource) // if we comment the dataSource property then we able to reproduce your reported issue
---
.Columns(col =>
{
--
})
)
|