/// <summary> /// Adding items to parent and registering events for buttons in row /// </summary> /// <param name="dataItems"></param> /// <param name="parent">Parent can either be Sublist (header) or Row</param> public void AddItemsToParent(List <Data.Item> dataItems, ListComponent parent) { if (_idManager) { _idManager.RegisterListObject(parent); } foreach (Data.Item data in dataItems) { List.Item item = CreateItem(data, parent.GetTransform()); if (parent.GetType() == typeof(Row)) { RegisterItemEvents(item, (Row)parent); } parent.Add(item); } if (!useItemTypePrefabs) { parent.Initialize(personalize); } else { parent.Initialize(); } }