Forum


16:58

13/11/2008

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.
01:08

Moderators
30/10/2007

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.
06:45

13/11/2008

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66