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 / update data on the server
18/09/2009
05:01
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

Hy, i have the following:

…..

 <link rel=”stylesheet” type=”text/css” media=”screen” href=”interface1/gridthemes/redmond/jquery-ui-1.7.2.custom.css” />
  <link rel=”stylesheet” type=”text/css” media=”screen” href=”interface1/ui.jqgrid.css” />   
  <script src=”scripts/jquery/jquery-1.3.2.min.js” type=”text/javascript”></script>
  <script src=”scripts/jquery/jquery-ui-1.7.2.custom.min.js” type=”text/javascript”></script>
  <script src=”scripts/grid/grid.locale-en.js” type=”text/javascript”></script>
  <script src=”scripts/grid/jquery.jqGrid.min.js” type=”text/javascript”></script>
  <script type=”text/javascript”>  
jQuery(document).ready(function(){
  jQuery(”#datagrid”).jqGrid({
    url:'data.php',
    datatype: 'json',           
    colNames:['Id', 'Nume', 'Localitate'],
    colModel:[
      {name:'colabid', index:'colabid', width:55, editable:true, editoptions:{readonly:true} },
      {name:'nume', index:'nume', width:300, editable:true},
      {name:'localitid', index:'localitid', width:100, editable:true}      
    ],   
    pager: jQuery('#pager'),               
    rowNum:10,
    rowList:[10,20,30],       
    sortname: 'colabid',   
    sortorder: 'desc',   
    viewrecords: true,                    
    caption: 'Colaboratori',
    editurl:”data.php?q=1″    
  })
  .navGrid('#pager',{edit:true,add:true,del:true,search:false},
      //edit

      {height:280, reloadAfterSubmit:true},
      //add
      {height:280, reloadAfterSubmit:true},
      //delete
      {height:280, reloadAfterSubmit:true},
      //search
      {},
      //view
      {}
  );
});
</script>
</head>
 <body>
 <table id=”datagrid”></table>
 <div id=”pager”></div> <br /> 
 </body>

…..

data.php?q=1 is updating data to server (it is working correctly).

when i press edit buton on navigator the edit form popup apears. i edit the data and when i press submit nothing happens.

I read on the jquery grid wiki and saw there onclickSubmit event.

How can i use this … or anything else to update the data on the server when i press submit after editing the data.

I don;t know how to pass the data to data.php

I would appreciate a little help.

best regards,

adrian

18/09/2009
06:31
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

Hy again,

It looks like the query in data.php wasn't correct.

Problem solved.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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