EasyUI Forum
September 15, 2025, 04:34:48 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: edata into combobox on inline edit - NOT working - HELP  (Read 10180 times)
mitja0
Newbie
*
Posts: 3


View Profile
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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>
Logged
mitja0
Newbie
*
Posts: 3


View Profile
« Reply #2 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



Logged
mitja0
Newbie
*
Posts: 3


View Profile
« Reply #3 on: May 14, 2013, 10:14:53 AM »



after i press on field

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: May 14, 2013, 10:40:39 AM »

Please refer to http://jsfiddle.net/bAqKD/.
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!