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
Adding new record via form
19/08/2010
21:48
Avatar
jmcleod3
Member
Members
Forum Posts: 33
Member Since:
04/05/2009
sp_UserOfflineSmall Offline

Hello all,

I'm using the new and improved jqgrid 3.8, jquery 1.4.2, and jquery ui 1.8.

When adding a new record to the grid via dialog form, how do I add a parameter, in addition to, the form parameters that are sent to the server?

appGrid.js

jQuery(document).ready(function(){
  jQuery("#contacts").jqGrid({
    url:'_getGridApplicationData.php?partner_id_link=46',
    datatype: 'json',
    mtype: 'GET',
    colNames:['Contact No','Last Name', 'First Name','Email','Phone', 'Fax', 'Note'],
    colModel :[
      {name:'member_contacts_id',
           index:'member_contacts_id',
           width:100,
           hidden:true,
           editable:false,
           editoptions:{
               readonly:true,
               size:10
           }
       },
      {name:'last', index:'last', width:120, align:'right', editable:true,editoptions:{size:10}},
      {name:'first', index:'first', width:120, align:'right', editable:true,editoptions:{size:10}},
      {name:'email', index:'email', width:200, align:'right', editable:true,editoptions:{size:40}},
      {name:'phone', index:'phone', width:110, align:'right', editable:true,editoptions:{size:11}},
      {name:'fax', index:'fax', width:110, align:'right', editable:true,editoptions:{size:11}},
      {name:'note',
             index:'note',
             width:100,
             sortable:false,
             hidden:true,
             editable: true,
             edittype:"textarea",
             editoptions:{rows:"2",cols:"20"},
            editrules:{edithidden:true}
      }
    ],
    pager: '#pager',
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'member_contacts_id',
    sortorder: 'asc',
    viewrecords: true,
    caption: 'Contacts',
    height:"100%",
    editurl:"_editContacts.php"
    
  });
  jQuery("#contacts").jqGrid('navGrid','#pager',
        {search:false,view:true}, //options
        {jqModal:true,checkOnUpdate:true,savekey: [true,13], navkeys: [true,38,40], checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true, bottominfo:"Fields marked with (*) are required"}, // edit options
        {jqModal:true,checkOnUpdate:true,savekey: [true,13], navkeys: [true,38,40], checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true,bottominfo:"Fields marked with (*) are required"}, // add options
        {reloadAfterSubmit:false,jqModal:false, closeOnEscape:true}, // del options
        {}, // search options
        {navkeys: [true,38,40], height:250,jqModal:false,closeOnEscape:true} // view options
      )
  });

Thanks for any help with this.

John

It's not who I am underneath, but what I do that defines me.

19/08/2010
22:47
Avatar
jmcleod3
Member
Members
Forum Posts: 33
Member Since:
04/05/2009
sp_UserOfflineSmall Offline

I just added a parameter to the end of editurl, like…

appGrid.js

editurl:"_editContacts.php?parameter=56″

then accessed it from a $_GET

_editContacts.php

$parameter = $_GET['parameter'];

John

It's not who I am underneath, but what I do that defines me.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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