Forum


06:17

05/02/2009

Hello,
I am having a problem with inline editting. When I press "Enter" then the page is submitted to my form action not to the editurl. I need the form because I have some txt fields etc. If I remove the form or the action then the page is submitted to it self.
I am performing row editting, not cel (or I am trying!)l.
My colModel is something like this:
colModel:[
{name:'id',index:'id', width:20, sorttype:"int", hidden:true, editrules:{edithidden:true} },
{name:'index', sortable: true, width:20, sorttype:"int", editable:false},
{name:'title',index:'title', width:90, editable:true, edittype:"text"},
{name:'subtitle',index:'subtitle', width:100,editable:true, edittype:"text"}
],
And also
onSelectRow: function(id){
if(id && id!==lastSel){
jQuery('#list2').restoreRow(lastSel);
jQuery('#list2').editRow(id, true);
lastSel=id;
}
},
editurl:"update.php" //is the last so no comma needed
Do I have to use something else? In all the examples I saw that was the only thing necessary. And Yes, I have incuded all the files (checked with firebug).
What am I doing wrong?
Ps. A demo if that helps http:/mexis.homeftp.org/final2/jgrid.html
Thanks for your help!
Dimitris Mexis
09:08

Moderators
30/10/2007

Hello,
Should check some things about this problem. Thank you.
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.
10:42

05/02/2009

After further examination I was wrong before...
If I remove the form element then it's working...like a charm.
Well, and with the form element the Post to editurl is actually taking place (i see the changes from phpmyadmin) but then is going to form action!
When I remove the action then the form is submitted to it self.
From firebug the ony I see (in both cases) is the get request and no Post, but the changes have been done. But actually the page has been sortove "refreshed" or submitted to form action. I think that I dont see the Post request for that reason. So the Post to my editurl is happening but because of the form element then it is submitted or to it self or to form action.
And the question is....Has anyone any idea how I can prevent this from happening? I really need the form element!!! 😀
Thank you very, very much!!!!
10:53

05/02/2009

Ok I did the simplest thing....
I get the div element of the grid outside of the form.... and that seems to working!!
But is there any way to know when a row is in edit mode, show with a function onSubmit in the form to return false and prevent the submit from happening?
I think this could help.....because its not right to have elements out of the form! Especially when I want to have the grid in the midle of a page!!!!
02:46

Moderators
30/10/2007

Hello,
That is exactly that I test currently- return false when enter key is pressed when saving the row.
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.
04:00

Moderators
30/10/2007

Hello,
In grid.inlinedit.js find
if (e.keyCode === 13) {
$($t).saveRow(rowid,succesfunc, url, extraparam, aftersavefunc,errorfunc);
}
Replace with
if (e.keyCode === 13) {
$($t).saveRow(rowid,succesfunc, url, extraparam, aftersavefunc,errorfunc);
return false;
}
Please let me know about the resul
Thank you
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.
Most Users Ever Online: 715
Currently Online:
32 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