EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mitja0 on May 14, 2013, 08:34:54 AM



Title: edata into combobox on inline edit - NOT working - HELP
Post by: mitja0 on May 14, 2013, 08:34:54 AM
Hi.
I have problem with combobox in datagrid and I doon't know what is wrong.

I use

<th data-options="field:'acPosta',width:100, 
                        formatter:function(value,row){ 
                            return row.texta; 
                        }, 
                        editor:{ 
                            type:'combobox', 
                            options:{ 
                                valueField:'ida', 
                                textField:'texta'
                            } 
                        }">Product</th>


data are [{"ida":"1","texta":"Maribor"},{"ida":"2","texta":"Kungota"},{"ida":"3","texta":"Celje"}]

I got data from
<script type="text/javascript">
    $(function(){
    $('#dg').edatagrid({
                url: '/prog/Data/Datas.phpe',
                saveUrl: '/prog/Data/DatasSave.php',
                updateUrl: '/prog/Data/DatasUpdate.php',
                destroyUrl: '/prog/Data/DatasDelete.php'
            });
        });
    </script>

everthing else work only combobox not.

thank you


Title: Re: edata into combobox on inline edit - NOT working - HELP
Post by: stworthy on May 14, 2013, 10:01:25 AM
Please try
Code:
<th data-options="field:'acPosta',width:100,  
                        formatter:function(value,row){ 
                            return row.texta; 
                        }, 
                        editor:{ 
                            type:'combobox', 
                            options:{ 
                                valueField:'ida', 
                                textField:'texta',
data:[{'ida':'1','texta':'Maribor'},{'ida':'2','texta':'Kungota'},{'ida':'3','texta':'Celje'}]
                            } 
                        }">Product</th>


Title: Re: edata into combobox on inline edit - NOT working - HELP
Post by: mitja0 on May 14, 2013, 10:08:16 AM
Thank you to replay but do not work.

when i press on combobox i found inside field
[{"ida":"1","texta":"Maribor"},{"ida":"2","texta":"Kungota"},{"ida":"3","texta":"Celje"}] and it is blank

hmmm





Title: Re: edata into combobox on inline edit - NOT working - HELP
Post by: mitja0 on May 14, 2013, 10:14:53 AM
(http://kmetije.bithosting.info/combobox.jpg)

after i press on field

(http://kmetije.bithosting.info/combobox1.jpg)


Title: Re: edata into combobox on inline edit - NOT working - HELP
Post by: stworthy on May 14, 2013, 10:40:39 AM
Please refer to http://jsfiddle.net/bAqKD/.