How to force UListView->AddItem() to construct items immediately?

I am using C++ to create a UListView and add list items in a loop.
It functions but I am unable to update properties on the list items because they are not constructed inside the scope of my file.

ServerListItemTest = CreateWidget<UmyServerListItem>(GetOwningPlayer(), myServerListItemclass);
myUListView->AddItem(ServerListItemTest);
ServerListItemTest->MySetTextMethod("text");

Does not work. ServerListItemTest NativePreConstruct and Construct are not yet called.

ServerListItemTest = CreateWidget<UmyServerListItem>(GetOwningPlayer(), myServerListItemclass);
myUCanvasPanel->AddChild(ServerListItemTest);
ServerListItemTest->MySetTextMethod("text");

Works properly. ServerListItemTest is Constructed after AddChild.

Is there an easy way to force the list or list items into constructing earlier, like the canvaspanel does so I can modify elements?

You can force building the underlying SWidget (this will eventually call the native construct method) by calling

ServerListItemTest->TakeWidget();

Let me know if this is what you were looking for and don’t forget to mark que answer as correct.

Enjoy!

That did force the list widget to construct. Unfortunately It still is not solving the issue of setting text. UListView->AddItem later calls another NativeConstruct and wipes any previous configuration.

I suppose I was asking the wrong question.