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
Need help with modal alert and selected row before showing edit form.
24/11/2008
16:58
Avatar
palobo
Portugal
Member
Members
Forum Posts: 41
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Hi all.

Back with another question. Even though the title practically says it all, here goes a description of what i need to do.

I'm implementing something similar to the master/detail demo however with the ability to add/edit records. I have a check in place to see if a user has selected a row in the master grid before adding a new record in the detail grid.

Currently, I have an alert in place warning that a row was not selected. I would like however to implemente something similar to the modal dialogue along the lines of what happens when we don't select a row before editing. In other words, display the modal alert and cancel the add action.

Thanks for any help.

Cheers,
P.

25/11/2008
01:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

The alert modal is created only once and you can use the every time

you want. The id is alertmod. Something like

in afterShowForm event

var masterid = $(”#master”).getGridParam(”selrow”)

if(masterid == null ){

// the editing modal is combination of editmod + id of the grid

// suppose you have detailgrid with detail id then

$(”#editmoddetail”).jqmHide();

ViewModal(”#alertmod”);

}

Or a better way is to define custom buttons and handle this logic.

without using afterShowForm

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.

25/11/2008
06:45
Avatar
palobo
Portugal
Member
Members
Forum Posts: 41
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Thanks for the quick reply Tony. I will try that out tonight.

Unfortunately for this current project I'm on a tight deadline and therefore cannot explore as much as I would like, but I have another project waiting and will be hopefully using jqGrid extensively.

I will post back on that project later with some fun things for newcommers like me. (Just to make the learning cureve less steep 😉 )

Cheers,
P.

25/11/2008
09:58
Avatar
palobo
Portugal
Member
Members
Forum Posts: 41
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Back again just to say thanks Tony. That did the trick.

With a bit more time I will look into jqModal a little more and hopefully will be able to harness it's power alongside jqGrid's 😉

Cheers,

P.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
65 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