Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.
Users reporting for no reason may be locked out.
using System;
using System.Linq;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
namespace Scripts
{
public class SelectDropdownItemTest : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
Dropdown dropdown = item.Theme.Dropdowns.Find("Dropdown1");
DropdownItem ddItem = dropdown.Items.FirstOrDefault(i => i.Text == "Item text");
if (ddItem != null)
dropdown.SelectedItem = ddItem;
return null;
}
}
}