Hi,
How can I get an item from list to string ?
I filled my list with XML. But now I need to get some item to process.
code:
dhx.ui({ id: ‘app’, view: ‘layout’, height: 482, width: 322,
rows: [
{ view: ‘layout’, type: ‘wide’,
rows: [
{ view: ‘toolbar’, type: ‘MainBar’,
elements: [
{ view: ‘label’, label: ‘Produtos’, id: ‘control_label_2’ }
], id: ‘toolbar_2’
},
{ view: ‘list’,
type: { width: 300, height: 22, margin: 0, padding: 10 },
id: ‘list_2’,
url: “…/…/getprodutosxml.aspx”,
datatype: “xml”,
template: “#codigo# (#nome#)”,
select: true
},
{ view: ‘button’, label: ‘Voltar’, id: ‘control_button_2’, click: “voltar()” }
], id: ‘layout_2’
}
]
});
$$(“list_2”).attachEvent(“onAfterSelect”, onitemclick);
function onitemclick() {
var id = $$(“list_2”).getSelected();
var myitem1 = ???
}