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_Related Related Topics sp_TopicIcon
make alertmod dialog unique for every grid
11/09/2012
18:27
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

there are problem with position of the alertmod dialog (the warning dialog created by navGrid to inform the user about no rows selected) if more aer one grid exist on the page. The current implementation share the same dialog. So the option like alerttext, alertcap, alerttop, alertleft etc. will be usged only from the first grid which will be created on the page. The same problem one fixed in Add/Edit/Delete/View dialogs by adding unique ids used for the gialog. I think the same way one could you here too.

So I suggest to change the line 

var alertIDs = {themodal:'alertmod',modalhead:'alerthd',modalcontent:'alertcnt'},

to the line like the following

var alertIDs = {themodal: 'alertmod_' + this.p.id, modalhead: 'alerthd_' + this.p.id,
modalcontent: 'alertcnt_' + this.p.id},

After the changes it will be probably logacal to change insertSelector, posSelector options of $.jgrid.createModal in the line from "","" to "#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0] like the same as in anothe places (see here for example) of the form editing code. In the case the alertmod dialog will be child of gbox instead of the child of HTML body. It could improve the behavior of recreating of grid with respect of GridUnload or direct jQuery methods.

Best regards
Oleg

P.S. See the answer which describe the problem and which confirm that the solution works.

14/09/2012
15:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Oleg,

Thanks. Fixed in GitHub

Best Regards

Tony

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.

14/05/2013
02:31
Avatar
payne26
New Member
Members
Forum Posts: 1
Member Since:
14/05/2013
sp_UserOfflineSmall Offline

I downloaded the new jqGrid and looked at the source to verify I am running the correct version of the code, but I am still having the problem where the alertmod dialog appears sometimes off of the visible page. My page has several grids and if you scroll down to the bottom and attempt to edit an item without first selecting the row, the alert dialog is displayed but it is at the top of the page and therefore not visible by the user. Is there a way to have this dialog display relative to the grid that triggered it?

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