Forum


22:04

24/01/2009

Hello
When I add an item to my grid I get this error:
00:36

Moderators
30/10/2007

Hello,
There is a option for this. Look into the docs. Look at your events. Some of them must return [true,''] or [false,'']. Look if you request is valid. What they return?
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.
02:59

24/01/2009

Hi Tony,
Usually I ask them to return {status: 0} if ok or an error code otherwise. I've tried to echo [true] and I still get the “updating database”/ajax busy message, tried [true,''] too and nothing. \\
When you said there was an option for this you mean the “afterSubmit” event ? (im using editGridRow)
BTW how I disable the red message? I have a personalized one… disabling at the grid didnt disabled this one.
Thank you,
Rodolfo.
>> Edit: I don't get the ret undefined message anymore. but the add modal is still on top and dont close, actually, stop responding and the ajax busy message don' t disappear.
The code I use to add a row:
$("#"+table).editGridRow( "new" ,{
url: '/services/add_item.php',
width : 420, height: 510,
closeAfterAdd: true,
afterSubmit: function(){
var rows = $("#"+table).getGridParam('rowNum');
rows = rows + 1;
$("#"+table).setGridParam({rowNum: rows});
}
});
};
16:18

24/01/2009

Ok… I won the “stupid of the year” prize.
The part:
var rows = $('#list').getGridParam('rowNum');
rows = rows + 1;
$('#list').setGridParam({rowNum: rows});
}
was the problem. And there was no real need for it..
It is all okay now, except for how turn off the loadui form saving/editing modal and the alignment problem which is in another post…
Thank you!
Rodolfo.
Most Users Ever Online: 715
Currently Online:
34 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