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
Edit in navbar and php server issue
18/10/2010
14:49
Avatar
DonNadie
New Member
Members
Forum Posts: 1
Member Since:
18/10/2010
sp_UserOfflineSmall Offline

Hello,

First of all, let me thank you for sharing that amazing work.

I´m newbie in using jqGrid (just a couple of days doing some trials), but I´ve meet and issue that keep me blocked when I´m using Edit option in from the navbar.

I´ve defined the editurl:save_add_edit.php in order to handle the 'add' and 'edit' actions updating or inserting records into my mysql databse.

In order to detectec in my save_add_edit.php code if comming operation it´s an insert or an update, I´m doing a previous select looking for the unique id that 'should' be passed as a $_request parameter to my php page. The fact is that the unique id seems to be always empty in my $_request array meanwhile if I create a new buton on my html page to handle the editting process it seems to work fine.

Here is the code that I´ve inserted in my html page to handle a button to edit the selected row which is working properly with my save_add_edit.php page.

$("#edit").click(function(){ var gr = jQuery("#list").jqGrid('getGridParam','selrow'); if( gr != null ) jQuery("#list").jqGrid('editGridRow',gr,{height:280,reloadAfterSubmit:true,closeAfterEdit:true,url:'save_add_edit.php?fn=2&idn='+gr}); else alert("Pulse sobre la fila que desea modificar")});

They key is that handling click event I can define an special url assigned to edit operation which I use to add an special parameter like fn=2 for dettecting in my php page that the incomming operation is an edit one.

Is there any way to 'redefine' an special url for the edit button in navbar?

Why the unique id it´s not passing throught to my php page ?.

Thank you so much for your help

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 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