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
Row id not being passed in inline edit
03/08/2009
07:11
Avatar
nwgeorge
Guest
Guests

I am having trouble getting inline editing to work. I keep getting "ReferenceError: id is not defined" in Firebug and when I use this code:

onSelectRow: function(id){
            alert(id);
            if(id && id!==lastsel2){
                jQuery('#rowed5').restoreRow(lastsel2);
                jQuery('#rowed5').editRow(id,true);
                lastsel2=id;
            }

the alert box is empty.

i have physically cut and pasted the demo code from example 5 of the inline grid editing demo (version 3.4.x) and it still does not work.

I have 3.4.4 with the patch installed.

i have searched these forums, but have not found a solution. My apologies if I have missed something, but I am not sure what is going on and need assistance.

Thanks in advance for your time.

Regards,

Nigel

03/08/2009
11:54
Avatar
pctotalsantafe
Guest
Guests

I have the same problem.

If you find the solution thank you the information.

My example:

onSelectRow: function(id){
      if(id && id!==lastsel){
        jQuery('#list').restoreRow(lastsel);
        jQuery('#list').editRow(id,true);
        lastsel=id;
      }
    }

if I use the same grid with editGridRow () works perfectly

04/08/2009
02:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

If you do not have uniquie id rowid (or at least do not set it) these will not work.

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/08/2009
02:52
Avatar
nwgeorge
Guest
Guests

Thanks for the reply Tony,

Can you please elaborate - I have used your own demo in my site to try and troubleshoot this - so I have the weird situation where I have code using local data (example 5) so as to not be server dependent - and it does not work.

It clearly works on your server, so I am obviously missing something - but I am not sure what.

Cheers,

Nigel

05/08/2009
06:17
Avatar
nwgeorge
Guest
Guests

Just a follow up for those who might come up on the same issue. My site is Django based and I was having all sorts of problems with getting blank row ids.

One real resource on the jqgrid site is the demo code - I recommend it to anyone who gets stuck. I downloaded the 3.4.x version and worked back from there.

Whatever the issues was, it was not jqgrids fault. What fixed it was replacing all the js with the exact structure and files of the demo code. You still have to change the /js path in jquery.jqGrid.js tho.

I had originally installed 3.4.4 with the patch. Whether it was my setup, or something in the patch, but this code did not work with Django. If you have issues try the js file from the demo code.

I have not tried 3.5 code.

Happy coding 🙂

Nigel

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information