i am trying to center the alertmod dialog on jqgrid. I have tried the answer by Oleg but did not work for me.
The alert happens when a button on pager is pressed (like delete) and a row is not selected.
I have this function setup for the delete, edit, etc dialogs and works fine
jQuery.fn.center = function () {
this.css("position", "absolute");
this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
return this;
}
I just cant get it to work for this error dialog
This is how i call it on the other dialogs like edit, delete, etc
afterShowForm: function (form) {
form.closest('div.ui-jqdialog').center();
}