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
Inline Editting Problem
05/02/2009
06:17
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

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

05/02/2009
09:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

05/02/2009
09:44
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Ok Tony...

Thanks for your response...

I am waiting for your answer/solution.... 😉

05/02/2009
10:42
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

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!!!!

05/02/2009
10:53
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

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!!!!

06/02/2009
02:46
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

06/02/2009
03:50
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Could you please give me some more info how to do that?

If you did this perhaps to paste the code.....If it is not trouble for you!

Thanks,

Mexis

06/02/2009
04:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

06/02/2009
04:18
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello,

It is working....

Now the form isn't submitted when I save a row!

I thougth that it would be something much more complicated!!!

Thank you very, very much....!!!!

Have a nice day!!!:D

Mexis

06/02/2009
04:31
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello again,

I have also an other question…..

Is there a way in a not edittable cell to have an active link and when someone press there to be redirected to that page?

The best would be without opening a new tab/window…

In the same the user is!

Thanks,

Mexis

06/02/2009
04:35
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Nevermind, I found it...!!!

Simple I add in a cell something like this

<a href=#>Link</a> and it is working!

Thanks....

You have a great plugin!!!!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information