-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Hello,
As the title suggests, I'm trying to figure out a solution to show the name of the custom entity in the NestedDataModelCollection when it shows on the Admin UI for editing in the list. Right now, if I set the [PreviewTitle] attribute on the [CustomEntity] property like so:
On a ICustomEntityDataModel
[Display(Name = "Rankings")]
[NestedDataModelCollection(IsOrderable = true)]
public ICollection<SchoolRankingDataModel> Rankings { get; set; }
}
public class SchoolRankingDataModel : INestedDataModel
{
[Display(Description = "Ranking Category")]
[CustomEntity(RankingCategoryEntityDefinition.DefinitionCode)]
[Required]
[PreviewTitle]
public int RankingCategory { get; set; }
[Display(Description = "Score")]
[Required]
[PreviewDescription]
public decimal Score { get; set; }
[Display(Description = "Rank")]
[Required]
public int Rank { get; set; }
}
This only shows the CustomEntity ID on the Admin UI editing screen when viewing the list. Is there a way to configure this, or route in a custom way for the listing to show the custom entities [PreviewTitle] property itself? I have [PreviewTitle] set on a string property in the custom entity that is being selected, but this seems to be ignored, and either only uses the int property or if I take it off of the int property, shows nothing.
Thanks in advance for the advice!