Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
How to position dialog showed by custom_func ?
09/04/2013
09:05
Avatar
Shanefalco
New Member
Members
Forum Posts: 2
Member Since:
08/04/2013
sp_UserOfflineSmall Offline

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

09/04/2013
12:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

10/04/2013
05:59
Avatar
Shanefalco
New Member
Members
Forum Posts: 2
Member Since:
08/04/2013
sp_UserOfflineSmall Offline

How can I pass parameters to the modal?

Or maybe I can somehow scroll to the row in which the error occurs, so user cah see the dialog ?

10/04/2013
21:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

11/04/2013
23:13
Avatar
krokador
New Member
Members
Forum Posts: 1
Member Since:
11/04/2013
sp_UserOfflineSmall Offline

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 :)

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information