EasyUI Forum
December 01, 2025, 07:50:10 AM *
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 / General Discussion / Re: chain combo inline editor on: August 18, 2012, 05:46:10 AM
hii..
i'ved try this but not working.
inline edit, i have 2 column editor, partname (combobox) and quantity(numberbox).
quantity will show the last quantity of selected partname.
so, actualy it's not a editor. but i dont know how to do that. Thats why i try with editor (numberbox) .
but not working.

please help me, there must be something wrong in mycode below.

Code:
function tagData(){
var row = $('#dg').datagrid('getSelected');
var idd;
if (row){
 $('#dlgtag').dialog('open').dialog('setTitle','Set Supplier');
 $(function(){
   $('#dlgt').edatagrid({
   onEdit:function(index,row){ idd=index;},
   onAdd:function(index,row){idd=index;},
   url: 'get_data1.php?id='+row.idfbstockopname,
   columns:[[
   {field:'name_part',title:'Part Name',width:200,editor:{type:'combobox',options: 
     {url:'part.php',valueField:'id_part',textField:'name_part',required:true,
      onChange:function(value){
var ed = $('#dlgt').edatagrid('getEditor',{index:idd,field:'lastqty_fbstockopname_detil'});
$(ed.target).numberbox('setValue',value);},
}}},
        {field:'lastqty_fbstockopname_detil',title:'Quantity',align:'left',width:100,editor:{type:'numberbox',}
}}
]],
});
});}
    }


best regards
2  General Category / General Discussion / Re: how to get specific field value of row on edatagrid to pass in URL editor on: August 15, 2012, 09:03:53 AM
awesome, thank you stworthy

this is my final code :
Code:
function tagData(){
 var row = $('#dg').datagrid('getSelected');
  if (row){
   $('#dlgtag').dialog('open').dialog('setTitle','Set Supplier');
    $(function(){
$('#dlgt').edatagrid({
  onEdit:function(index,row){
   var ed = $(this).edatagrid('getEditor',{
index:index,
field:'name_supplier'
});
$(ed.target).combobox('reload','supplier.php?id='+row.id_part_cat);
},
url: 'get_data1.php?id='+row.idfbrequestpo,
updateUrl: 'update_ing.php?idx='+row.idfbrequestpo,
columns:[[
{field:'name_part',title:'name of part',width:100,
editor:{type:'text'}},
{field:'name_supplier',title:'supplier',width:100,
editor:{type:'combobox',options:{
valueField:'id_supplier',textField:'name_supplier',required:true}}
}
]],
});
    });}
}

now, only related part category will be listed in combobox.
regards
putu
3  General Category / General Discussion / how to get specific field value of row on edatagrid to pass in URL editor on: August 11, 2012, 10:04:15 PM
hi there..
i have datagrid (edatagrid), retrieve from table PART (part,idsupplier)
edatagrid has 2 column with only one is inline editing (combobox).
This combobox will retrieve data from table SUPPLIER (idsupplier,namesupplier) through URL supplier.php. and everythings OK.
But, since datagrid only for editing (no addrow), and each supplier have a category, I need to add parameter on url. so the new URL is supplier.php?idcat=XX.  (contains of each combobox is different each row, depends on idcat.

"XX" will be the value of field idpart on table PART.

How do I write down this XX value ?

Code:
<table id="dlgt"
toolbar="#toolbartag" pagination="true"
rownumbers="true" fitColumns="false" singleSelect="true" idField="idpart">
<thead>
<tr>
<th field="part" width="200" sortable="true">Part</th>
<th field="namesupplier" width="350" sortable="true"
editor="{type:'combobox', options{url:'supplier.php?idcat=XX', valueField:'idsupplier',
                                textField:'namesupplier', required:true}}">Supplier</th>
</tr>
</thead>
</table>


thanks for your great support..
best regards
Putu
4  General Category / General Discussion / chain combo inline editor on: August 08, 2012, 08:10:51 PM
how can i make a chain combobox inline editing ? for common sample in datagrid : city | country.
city load database. but after selection on city, combobox on country will displaying only related item from city.
i've read combo-tree sample, but still dont know how to implement it to inline editor with separate column.

best regards
putu
5  General Category / General Discussion / Re: Post updated row to database through Inline Editing on: August 07, 2012, 01:42:48 AM
how can i missed http://www.jeasyui.com/tutorial/app/crud2.php ... omg

thank you stworthy..
6  General Category / General Discussion / Post updated row to database through Inline Editing on: August 06, 2012, 07:39:36 AM
dear all, i've try http://www.jeasyui.com/tutorial/datagrid/datagrid12.php. it works but after refresh data is back to original (before update). how can I save or post the data to database after inline editing ?
I mean, i need post updated data to MySQL.


would you please give me the example

best regards
7  General Category / EasyUI for jQuery / Updating value of textbox from combobox on: July 13, 2012, 04:07:23 AM
basically i wanna retrieve my dtbase and populate as an items on combobox. And everytime i change or select the items, it will update value of other form component like (textbox).

this is work for me, but CMIIW

Code:
$().ready(function(){
 $('#id1').combobox({
  onSelect:function(record ){
   $('#id2').val(record.f3);
  }
 });       
});
----
<input id="id1" name="id1" style="width:300px" class="easyui-combobox"
url="database.php" valueField="f1" textField="f2" required="true">
<input type=text id='id2' size='20' disabled>
----
database.php:
$rs = mysql_query("select * FROM db");
//fileds : f1,f2,f3,f4
$items = array();
while($row = mysql_fetch_object($rs)){
array_push($items, $row);
}
echo json_encode($items);

regards
putu
8  General Category / EasyUI for jQuery / Re: auto refresh periodicaly of datagrid on: July 12, 2012, 06:24:22 AM
awesome  Cheesy
thanks

regards
putu
9  General Category / EasyUI for jQuery / Multiple Field in ComboBox on: July 12, 2012, 05:13:30 AM
this is how i use multiple field as textfield in a single combobox. It works for me  Smiley but Please CMIIW...  Wink


Code:
dtbase.php :
$rs = mysql_query("select id_customer,concat(firstname_customer,' ',lastname_customer) AS name
        FROM customer order by firstname_customer ASC");
$items = array();
while($row = mysql_fetch_object($rs)){
array_push($items, $row);
}
echo json_encode($items);

-------

<input name="id" style="width:300px" class="easyui-combobox" url="dtbase.php"
valueField="id_customer" textField="name" required="true">



regards
10  General Category / EasyUI for jQuery / auto refresh periodicaly of datagrid on: July 10, 2012, 10:05:50 AM
how can I make grid auto refresh every 15 sec ?
i want to display almost real time list of order update without pressing button

regards
putu
11  General Category / EasyUI for jQuery / CRUD in Master - Detail datagrid on: July 02, 2012, 08:24:13 AM
EasyUI Master Detail is really great ...remind me to Delphi ..

But can I make CRUD operation in master grid and also in detail grid ? Demo file is just show how EasyUI can display data in master detail layout.

best regards
12  General Category / EasyUI for jQuery / Re: Nested Dialog Form on: July 02, 2012, 06:38:35 AM
thnks for reply n support stworthy

my combo box refer through file modul/mod_part/part_cat.php to table(name_part_cat) which is has 2 fields : id_part_cat and name_part_cat. none of these fields allows to empty (both required).

part_cat.php :
Code:
 $rs = mysql_query("select * FROM part_cat order by name_part_cat ASC");
 $items = array();
 while($row = mysql_fetch_object($rs)){
array_push($items, $row);
 }
echo json_encode($items);

does "The combobox data has been loaded .." means :  i just typing directly new item inside combo box ?

best regards



13  General Category / EasyUI for jQuery / Nested Dialog Form on: July 01, 2012, 08:24:40 PM
dear all, please help. I totally newbie with EasyUI but starting to enjoy Smiley

i follow the example :

Code:
function newData(){
 $('#dlg').dialog('open').dialog('setTitle','New Data');
 $('#fm').form('clear');
 url = 'modul/mod_part/save_data.php';
}

<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newData()">New Data</a>

<div id="dlg" class="easyui-dialog" style="width:650px;height:350px;padding:10px 20px" closed="true" buttons="#dlg-buttons">
 <div class="ftitle">Master Parts</div>
  <form id="fm" method="post" novalidate>
    <div class="fitem" align="left">
        <p><label>Category</label>
         <input name="id_part_cat_part" style="width:100px" class="easyui-combobox"
              url="modul/mod_part/part_cat.php"valueField="id_part_cat" textField="name_part_cat" required="true"> </input>
         </p>

....

I'm using PHP and MySQL, so far its work.

so every time i click Add New button, dialog form will show up with combobox.

Now, my problem is :
if the items is not in list, i want to open another dialog form to add new item to the combobox. So, i need open 2 dialog form whichis nested.
how can i do that ?
or maybe any complete simple example for this ?

sorry for typo and my bad english

regards

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!