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.
Emmanuel Suter wrote:You can change the DataClassIndex property of the widget just by specifying a new value. The type must be one of the available values in the DataClassIndex enum. The possible values are:
Other things.
Is it possible to change Data Class filter of a widget ?
For some ticker or resluts, it will be intersting to just change that for show standing class1 or class2 or all.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemeEditor.Data;
namespace Scripts
{
public class ChangeClassIndex : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var widget = item.Theme.Widgets.Find("Widget1");
// Change to FollowedClass
widget.DataClassIndex = DataClassIndex.FollowedClass;
// Change to class 2
widget.DataClassIndex = DataClassIndex.Class2;
// Change to class "n" where n is an integer 1-10
var n = 5;
widget.DataClassIndex = (DataClassIndex)n;
return null;
}
}
}