EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: binte.hava on March 05, 2014, 03:48:14 AM



Title: Combogrid and Edatagrid
Post by: binte.hava on March 05, 2014, 03:48:14 AM
Hi!
I want to use combogrid in one cell of edatagrid and want to populate three fields of the edatagrid.


Title: Re: Combogrid and Edatagrid
Post by: stworthy on March 05, 2014, 11:55:43 PM
Please refer to this topic http://www.jeasyui.com/forum/index.php?topic=2996.0.


Title: Re: Combogrid and Edatagrid
Post by: binte.hava on March 07, 2014, 08:42:24 AM
I have seen this post and paste this code as it is. actualy i have to save value in another table and combogrid values will be comes from another table but right now the combogrid is empty :( dont know what to do now.... :(

<table id="dgsv_admin" title="WORKSHEET" style="width:950px; height:460px;"
         toolbar="#toolbar" pagination="false" idField="id"
         rownumbers="false" fitColumns="false" singleSelect="true">
   
      <thead>
         <tr>
            <th field="code" width="62" editor="{type:'combogrid',options:{required:true,url:'<?php echo base_url('index.php/adminworksheetscontroller/get_master_material')?>'}}">Code</th>
            <th field="type" width="64" editor="{type:'validatebox',options:{required:true}}">Type</th>
            <th field="room" width="61" editor="{type:'numberbox',options:{required:true}}">Room</th>
            <th field="length" width="61" editor="{type:'numberbox',options:{required:true}}">Length</th>
            <th field="type" width="61" editor="{type:'numberbox',options:{required:true}}">Depth</th>
         </tr>
           </thead>
</table>



<script type="text/javascript">
   $(function(){
      $('#dgsv_admin').edatagrid({
            url:'<?php echo base_url('index.php/adminworksheetscontroller/get_worksheet_stone_data')?>',
         });
   });
</script>

1-The Database table name is master_materials.There are six columns in that databse right now.
2-I want to add combogrid to the first cell of the Edatagrid.
4-The combogrid should only show one colum of the Database that is master_codes.
5-When the code is selected in combogrid I want to autopopulate the Length and Depth cells of the edatagrid from the Database other two columns(length and Depth) respective to that code.
6-Then I have to save the values in other table after the further calculation.