Setting array values with IPropertyHandleArray

I want to customize the ui for my component with a button that (after some other stuff) will add an entry into a TArray member.

But I can’t figure out how to manipulate the array variable through IPropertyHandle or IPropertyHandleArray. While there is a function AddItem() it doesn’t add anything to the array (at least GetNumElements shows no change) nor does it give me the possibility to manipulate the item.

I tried using the IPropertyHandle::AccessRawData but I’m unsure of how it works exactly and there is no helpful example for it in the engine.

Any ideas?

Ok, I found out that the IPropertyHandleArray::GetNumElements() only works after the ui has been refreshed.
So now my question is, how can I force the Property to update its values instantly or do I have to wait for the ui update and only insert values afterwards?

Ok, I figured out how to use AccessRawData which fits my needs for now.

		TArray<void*> rawData;
		handle->AccessRawData(rawData);
		ensure(rawData.Num() == 1);
		TArray<FString> *ref = reinterpret_cast<TArray<FString> *>(rawData[0]);
		ref->Add("text");