EasyUI Forum
September 16, 2025, 01:10:12 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Single field with datagrid on: December 22, 2016, 04:25:11 PM
So what I want to do is like this

Code:
			var rows = $('#dg').datagrid('getSelections');
var datastr = JSON.stringify(rows);
var posting = $.post( url, { dg: datastr, charter_type: $('#charter_type').val() } );

Only when I try and read it on the php page called I get Undefined index: dg

Code:
$dg = $_REQUEST['dg'];
$obj = json_decode($dg);
$activity_code = $obj['activity_code'];
$description = $obj['description'];
$amount = $obj['amount'];
$unit_of_measurement = $obj['unit_of_measurement'];
$quantity = $obj['quantity'];
$hours = $obj['hours'];
$charter_type = $_REQUEST['charter_type'];

Yet the charter_type came through

2  General Category / EasyUI for jQuery / Re: Single field with datagrid on: December 20, 2016, 12:46:31 AM
Thanks, does that mean I can include a form on the datagrid and pass the name of the selected list as well?
3  General Category / EasyUI for jQuery / Single field with datagrid on: December 19, 2016, 11:02:38 AM
I want to have a datagrid where I go through and tick on and off items, than give this selection a name and save it to the database. How can I add a field at the topas a name, with a button to save (insert all the ticked items as rows in a table with the field name)?

Andrew

e.g.

Selection Field Name: MySelection

A          B  C Selected
Fred      0   1 Tick
Barney  1   3 Unticked
Wilma   2   1 Tick


So rows Fred and Wilma are saved with the name "MySelection" into a table
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!