Load data form Combo or RichSelect

I created a combo / richselect that needs to be updated.

I tried in several ways.

Was unable to set the url parameter. Because I use a function that has parameter and the url property does not recognize.

“… / relvisitas / buscaPedidos? id = 5”

Thus, it does not recognize the ID parameter = 5, and gives a 404 page not found.

With ajax …

dhx.ajax (.) post (“… / relvisitas / buscaPedidos” “id =” + id, function (text) {
$ $ (‘cboPedido’). define (“data”, text);
$ $ (‘cboPedido’). refresh ();
console.log (“text”, text);

ajax Json returns just right of the object data.

[{id: '110 ', value: '110 - 23/04/2013 "}, {id: ‘112’, value: '112 - 23/04/2013 '}]

But the data does not appear in the combo or richselect.

{view: ‘richselect’
label: ‘Application’,
labelWidth: 150,
Id ‘cboPedido’
datatype: “json”,
/ / Data: applications,
filtering: true


Combo consists of input and Popup with List. You need to reload List data to change options

For example:

var options = [{id:1,value:“option 1”},{id:2,value:“option 2”}];
var list = $$(“cboPedido”).getList();

Worked. Thank you.

Saved my day.

I got this to work OK but the yCount of the richselect does not change when the new option list is parsed. Do I have to specifically set this parameter and if so how?

Try something like so:

// add new item and change yCount
var sId = “richselect1”
var list = $$(sId).getList();

// resize popup
var popupId = $$(sId).config.popup;

OK. That works. Thanks.