EasyUI Forum
May 17, 2024, 07:32:06 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: editing subgrid  (Read 5214 times)
chloe
Newbie
*
Posts: 1


View Profile
« on: May 15, 2014, 10:42:02 PM »

how can I editing data on subgrid ?
this is my code,,
Code:
<table id="dg" style="width:auto;height:400px"
    url="get.php"
    title="List Master"
    singleSelect="true" fitColumns="true">
    <thead>
        <tr>
            <th field="sp_id" width="10" align="center">ID</th>
            <th field="sp_name" width="100">Name</th>
            <th field="st_symbol" width="20" align="center">Symbol</th>
            <th field="sp_volume" width="30" align="right">Volume <br /> Satuan</th>
            <th field="price" width="50" align="right">Price <br /> (Rp)</th>
            <th field="sp_status" width="40">Status</th>

        </tr>
    </thead>
</table>
<script type="text/javascript">
        $(function(){
            $('#dg').datagrid({
                view: detailview,
                detailFormatter:function(index,row){
                    return '<div style="padding:2px"><table class="ddv"></table></div>';
                },
                onExpandRow: function(index,row){
                    var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
                    ddv.datagrid({
                        url:'rincian.php?sp_id='+row.sp_id,
                        fitColumns:true,
                        singleSelect:true,
                        rownumbers:true,
                        loadMsg:'',
                        height:'auto',
                        columns:[[
                            {field:'sd_name',title:'Resources Name',width:180},
                            {field:'st_symbol',title:'Symbol',width:50,align:'center'},
                            {field:'r_koefisien',title:'Koefisien',width:70,align:'right'},
                            {field:'t_price',title:'Supplier Price',width:100,align:'right'},
                            {field:'s_name',title:'Supplier',width:200}
                        ]],
                        onResize:function(){
                            $('#dg').datagrid('fixDetailRowHeight',index);
                        },
                        onLoadSuccess:function(){
                            setTimeout(function(){
                                $('#dg').datagrid('fixDetailRowHeight',index);
                            },0);
                        }
                    });
                    $('#dg').datagrid('fixDetailRowHeight',index);
                }
            });
        });
</script>

Logged
Szoron
Newbie
*
Posts: 21


View Profile
« Reply #1 on: May 31, 2014, 03:24:02 AM »

there is a solution?

this my (editing subgrid) problem:
Main grid is an address list
subgrid is a questionnaire more checkbox

Selecting an address and checking the checkboxes.

but i dont editing subgrid.
I tried editing cell and row editing. but none succeeded.

help me
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!