EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: fcodebue on September 28, 2011, 08:01:03 AM



Title: populate combo via json
Post by: fcodebue on September 28, 2011, 08:01:03 AM
I'm try to populate combo via json and using it in a grid
look at code...

Code:
...

      columns:[[
        {field:'cb', title:'',checkbox:true, width: 50},
        {field:'id', title:'id', width: 50},
        {field:'codice', title:'codice', width: 50},
        {field:'riga', title:'riga', sortable:true, width: 50},
        {field:'iva_codice', title:'IVA', sortable:true, width: 150,   
editor:{
type:'combobox',
options:{
valueField:'codice',
textField:'descrizione_1',
      url:'c_op/aliquote_iva',
required: true
}
}                 
        },
        {field:'imponibile_valore_valuta', title:'imponibile', sortable:true, width: 120, align: 'right',
          editor: {type:'numberbox', options:{ precision:2}}},
        {field:'conto_codice', title:'mastrino', width: 90, editor:'text'},
        {field:'descrizione_1', title:'descrizione', width: 250, editor:'text'}
      ]],
...


what's worng?


Title: Re: populate combo via json
Post by: stworthy on September 29, 2011, 05:57:35 PM
It seems there is no problem. Usually you should define the 'formatter' function to format your field value when end the editing action.