Good day.
How to dinamic add items to radio
i want to do that:
{ type: 'radio', id: 'radioFiles', label: 'Список файлов для вставки', //items: [['1'],['2']], items: setItems(), style : 'color:green; font-size: 12px', setup: function(element){ this.setItem("1", "dta"); }, onClick : function() { if(this.getValue()) alert( 'Current value: ' + this.getValue() ); } }, ------------------------ function setItems() { items = []; $.getJSON('/Upload/JsonFiles?type=image', function(data) { $.each(data, function(key, val){ items.push([[val.Name]]); }); }); return items; };
But i cannot add some items.
Plz, tell me what I'm doing wrong?