Check documentation for the latest version of dhtmlxSuite getItemData DHTMLX Docs

getItemData

returns items of the list attached through the attachList method

array getItemData( [string|number id] );
idstring|numberoptional, item id, if not specified data for all items will be returned
arrayarray with data

Example

var myPop = new dhtmlXPopup(...);
myPop.attachList("name,price", [
    {id: 1, name: "Audi A5 Coupe", price: "31550"},
    {id: 2, name: "Audi A5 Sportback", price: "30990"}
]);
 
var data = myPop.getItemData(1);
/*
result:
data = [{id: 1, name: "Audi A5 Coupe", price: "31550"}]
*/
 
var data = myPop.getItemData();
/*
result:
data = [
    {id: 1, name: "Audi A5 Coupe", price: "31550"},
    {id: 2, name: "Audi A5 Sportback", price: "30990"}
]
*/

Back to top