Forum


10:19

07/12/2010

hi
i am using the code below to delete a row everything is fine but i want to know if i can replace the alert with the warning that appears when i click on delete from the navigator
$("#dedata").click(function(){
var gr = jQuery("#delgrid").jqGrid('getGridParam','selrow');
if( gr != null ) jQuery("#delgrid").jqGrid('delGridRow',gr,{reloadAfterSubmit:false});
else alert("Please Select Row to delete!"); });
Thanks for help
10:44

10/08/2009

Hello elie,
Look at code of the the answer where I showen how the $.jgrid.viewModal method can be used to show the same message like jqGrid do in the navigator.
Best regards
Oleg
$.jgrid.viewModal
12:14

10/08/2009

The message "... is not a function" means that you not included jqGrid module during the downloading of the jqGrid. You should open jquery.jqGrid.min.js, search at the begining of the file for "Modules:" and you the file grid.common.js must be inside.
Moreover I suppose that you use jqGrid version 3.8.2. In some more old versions (inclusive 3.8.2) the viewModal was global function not in the namespace $.jgrid. So in previous version you should use viewModal instead of $.jgrid.viewModal.
Best regards
Oleg
13:07

07/12/2010

Dear Oleg
i am using the 3.8 version and i have all modules in jquery.jqGrid.min.js
i think the problem now is from my side because when i click the button nothing happens but the message " $.jgrid.viewModal is not a function " is gone.
i will try to find what's wrong.
Thank you very much
Regards,
Elie
14:22

10/08/2009

Hi Elie,
In the previous my post I made typing error. In all old versions before 3.8.2 (inclusive 3.8.1, 3.8) the viewModal was global function not in the namespace $.jgrid. You wrote that you use 3.8, so you should either download jqGrid 3.8.2 which contain many bug fixes and some new features (see here) or use viewModal instead of $.jgrid.viewModal.
Best regards
Oleg
15:12

10/08/2009

I searched in my collection of different demos and fould two examples
The first example use jqGrid 3.7.2. If you clich on the last custom button on the navigator if no row selected you will see warning dialog which are produced with respect of viewModal.
In the next example which use jqGrid 3.8.2 you should confirm twice the "loadComplete is called" message and then click on the "Search" button. If no row selected in the grid you will display warning message with respect of $.jgrid.viewModal.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
65 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