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
navigator items
29/06/2010
00:29
Avatar
jboss
Member
Members
Forum Posts: 13
Member Since:
29/06/2010
sp_UserOfflineSmall Offline

hello all,

im reading the wiki example to learn more about jgrid and i have a few questions/errors with it.

i have a grid with add/edit/delete navigator.if i push on add item and i see on firebug what im sending:

Parametersapplication/x-www-form-urlencoded
oper

edit
Source

oper=edit

and i want to add.

other question is how can i put a diferent action of each navigation item, my code is…

<script type="text/javascript">
jQuery(document).ready(function(){
  jQuery("#list").jqGrid({
    url:'includes/user.php',
    datatype: 'xml',
    mtype: 'POST',
    colNames:['id','user', 'passwords'],
    colModel :[
      {name:'id', index:'id', width:155},
      {name:'user', index:'user', width:190},
      {name:'password', index:'password', width:180, align:'right'},
    ],
    pager: '#pager',
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'id',
    sortorder: 'asc',
    viewrecords: true,
    editurl: 'includes/add.php',
    caption: 'Hello world'
  }).navGrid('#pager',
          {add: true, edit: true, del: true, search: true},
          {url:'add.php'},
          {url:'edit.php'},
          {url:'del.php'}, 
          {multipleSearch : true},
          {closeOnEscape:true} /* allow the view dialog to be closed when user press ESC key*/
          );
});
</script>

thnks

29/06/2010
09:55
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Probably you need to add to your colModel editable: true... Only the editable columns are being sent to the server... If you want your buttons on the navigator to do something else... then probably you need to add custom buttons. Otherwise, you can use the methods afterComplete, afterSubmit etc. to manage your data. Read the documentation for more information...

29/06/2010
19:33
Avatar
jboss
Member
Members
Forum Posts: 13
Member Since:
29/06/2010
sp_UserOfflineSmall Offline

thanks, i forgot the "editable" tag. with that and an action.php i can use the diferents navigator items.

28/07/2010
23:58
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello jboss,

I see that use of url parameter for navGrid which I don't see it in documentation and I see you call add.php.... is that add.php a PHP function where for example you check if there are records in another table in the way you allow/disallow calling the form editing?... If yes, then how do you call the form editing from add.php?...

thanks

Ciao

Luigi

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