#103895
admin
Keymaster

Hi,

Yes, there is. You can use the dataSource property to set the items instead of creating html element for each item.

Example:

` document.getElementById(‘dropDownListMethodsDemo’).dataSource =
[{
label: “Andrew”,
value: 1,
group: “Product Owners”
},
{
label: “Natalia”,
value: 2,
group: “Developers”
},
{
label: “Michael”,
value: 3,
group: “Developers”
},
{
label: “Angel”,
value: 4,
group: “Product Owners”
},
{
label: “Hristo”,
value: 5,
group: “Developers”
},
{
label: “Peter”,
value: 6,
group: “Developers”
},
{
label: “Albert”,
value: 7,
group: “Support”
},
{
label: “George”,
value: 8,
group: “Support”
}];`

Best regards,
Peter Stoev

Smart UI Team
https://www.htmlelements.com/