EasyUI Forum
September 14, 2025, 03:02:37 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: edatagrid pass extra data and the editors?  (Read 7314 times)
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« on: December 17, 2013, 08:42:59 AM »

hi, Im using edatagrid extension to update some values

but not how to get server side some extra data

here my example:

Code:
$('#dg-ab').edatagrid({
url: 'get_datagrid_data.php',
idField: 'id_game',
updateUrl: 'update_data.php',
});
<table id="dg-ab">
<thead>
<tr>
      <th field="game_name" width="290" sortable="true"></th>
      <th field="score_game" width="50" sortable="true">High Score</th>
      <th field="player1" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 1</th>
      <th field="player2" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 2</th>
      <th field="player3" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 3</th>
      <th field="player4" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 4</th>
      <th field="player5" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 5</th>
</tr>
</thead>
</table>

the entire row was edited updating scores of five players per game
although not shown in Table I have the game id from the 'get_datagrid_data.php',
I need to get in 'update_data.php' is

$id_game = $_POST['id_game'];
$score_game = $_POST['score_game'];
$player_1_score = $_POST['player1'];
$player_2_score = $_POST['player2'];
$player_3_score = $_POST['player3'];
$player_4_score = $_POST['player4'];
$player_5_score = $_POST['player5'];

then the question is how to get the field score_game which is not editable?
« Last Edit: December 17, 2013, 08:44:38 AM by catpaw » Logged
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« Reply #1 on: December 17, 2013, 09:52:09 AM »

Hi, sorry I was not doing the right tests.

No need to add anything, as this works ok
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!