Hi,
I have a ListView populated by a custom adaptor and I want to display a message when there are no entites. How can I accomplish that?
My ListView looks like this:
<SfListView TValue="Entity" HeaderTitle="Title" ShowCheckBox="false" ShowHeader="true" Height="75vh/*")" Query="new Query().Where(nameof(EntityList.Id), nameof(Operator.Equal).ToLowerInvariant(), currentEntity?.Id)">
<SfDataManager AdaptorInstance="@typeof(SimpleODataAdaptor<ServiceOrder>)" Adaptor="Adaptors.CustomAdaptor" />
<ListViewFieldSettings TValue="Entity" Id="@nameof(Entity.Id)" Text="@nameof(Entity.Title)" />
<ListViewTemplates TValue="Entity" >
<Template>
...
</Template>
</ListViewTemplates>
</SfListView>
Best regards
Daniel
|
public void created()
{
if (serviceAdapter.Entities.Count() == 0)
{
msg = "List Items are empty";
}
} |
Hi,
thank you for your help but that's not really what I was looking for.
Clarification: I have this ListView with a given height of 50vh and I want to display the message in the middle of the ListView. I also cannot use the Entites property of the custom adaptor directly because the ListView also has a where Query. How can I achieve that under the given circumstances?
Best regards
Daniel
Hi,
great, thank you very much for your help.
Best regards
Daniel