Forum


09:05

08/04/2013

Hi!
I'm using jqGrid in inline edit mode and I've implemented my custom function to check column value (on add and edit).
My grid is large, but fixed in height, so it has scroll.
When user enter invalid value warning dialog shows to the user, but at the very bottom of the page.
It seems it chooses the position to the row where invalid value is, but I'd like to position it at the center of the window.
How can I do it?
I know how to find it and position, but when?
Is there an event in which I can found this dialog via jQuery and position it?
Thanks
12:05

Moderators
30/10/2007

Hello,
Yes this is true. The dialog is shown in the row where the error is.
Currently there is no way to position the dialog in place where you want.
One possible solution is to pass parameters of the modal, but I need to chack this if this will not make other problems.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
21:18

Moderators
30/10/2007

Hello,
As I say you can not pass parameters to the modal. These are hardcoded.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
23:13

11/04/2013

Hello,
I have found the following workaround to tinker with the info_dialog element before it is shown:
$(document).ready(function () { $.jgrid.jqModal = $.extend($.jgrid.jqModal || {}, { beforeOpen: centerInfoDialog }); }); function centerInfoDialog() { var $infoDlg = $("#info_dialog"); var $parentDiv = $infoDlg.parent(); var dlgWidth = $infoDlg.width(); var parentWidth = $parentDiv.width(); $infoDlg[0].style.left = Math.round((parentWidth - dlgWidth) / 2) + "px"; }
Originally posted at: Stackoverflow
I hope that helps
Most Users Ever Online: 715
Currently Online:
44 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66