- Home
- Forum
- ASP.NET Web Forms
- Validation Placement Issue with Chome
Validation Placement Issue with Chome
I'm using the flowing code to place the validation error messages in eh:grid control.
function complete(args) {
if (args.requestType == "beginedit" || args.requestType == "add") {
var old = $("#" + this._id + "EditForm").validate().settings.errorPlacement;
$("#" + this._id + "BU").ejDropDownList({
select: function (args) {
$(this.element.closest(".e-ddl")).siblings(".e-error").remove();
}
})
var proxy = this;
$("#" + this._id + "EditForm").validate().settings.errorPlacement = function (error, element) {
if (element.attr("ID") == proxy._id + "BU" || element.attr("ID") == proxy._id + "Period"
|| element.attr("ID") == proxy._id + "ISChoice" || element.attr("ID") == proxy._id + "NewExpand") {
$container = $(error).addClass("e-error");
$tail = ej.buildTag("div.e-errortail e-toparrow");
$container.append($tail);
$container.offset({ right: $(element).parent().position().right + $(element).closest("td").width() });
$container.insertBefore(element.closest(".e-widget"))
}
else
old.apply(this, [error, element]);
}
}
}
It work perfectly in Firefox and IE/Edge:

But under Chrome the Validation covers the control:

Thanks,
Mike
function complete(args) {
if (args.requestType == "beginedit" || args.requestType == "add") {
var old = $("#" + this._id + "EditForm").validate().settings.errorPlacement;
$("#" + this._id + "BU").ejDropDownList({
select: function (args) {
$(this.element.closest(".e-ddl")).siblings(".e-error").remove();
}
})
var proxy = this;
$("#" + this._id + "EditForm").validate().settings.errorPlacement = function (error, element) {
if (element.attr("ID") == proxy._id + "BU" || element.attr("ID") == proxy._id + "Period"
|| element.attr("ID") == proxy._id + "ISChoice" || element.attr("ID") == proxy._id + "NewExpand") {
$container = $(error).addClass("e-error");
$tail = ej.buildTag("div.e-errortail e-toparrow");
$container.append($tail);
$container.offset({ right: $(element).parent().position().right + $(element).closest("td").width() });
$container.insertBefore(element.closest(".e-widget"))
}
else
old.apply(this, [error, element]);
}
}
}
It work perfectly in Firefox and IE/Edge:
But under Chrome the Validation covers the control:
Thanks,
Mike
SIGN IN To post a reply.
3 Replies
VA
Venkatesh Ayothi Raman
Syncfusion Team
October 7, 2016 09:38 AM UTC
Hi Michael,
Thanks for contacting Syncfusion support.
We are able to reproduce the reported issue at our end and we have achieved your requirement using adding the CSS property for DOM element to resolve this issue. Please refer to the code example and screenshots,
Code example:
|
<style>
.e-grid div.e-error {
position:relative; /*applying the CSS property*/
}
</style> |
Screenshot of Browsers:
Regards,
Venkatesh Ayothiraman.
ML
Michael Lambert
October 7, 2016 04:51 PM UTC
Worked, Thanks!
VA
Venkatesh Ayothi Raman
Syncfusion Team
October 10, 2016 03:59 AM UTC
Hi Michael,
Thanks for the feedback.
We are happy to hear your requirement is achieved.
Regards,
Venkatesh Ayothiraman.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
ML Michael Lambert
- Oct 6, 2016 06:12 PM UTC
- Oct 10, 2016 03:59 AM UTC