Friendly name of a BusinessBase child BusinessListBase #3013
-
I have a display razor component in Blazor that I am creating a data grid view to show child objects. I can do this easily enough but I am wondering if it is possible to show the child properties friendly name through the view model and if so, what is the best way to do this? Just for clarification; the view shows a customer as read only with several lists below their main information showing contacts, locations, and transactions. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Are you using the |
Beta Was this translation helpful? Give feedback.
-
Not quite sure how that works. Would I have to do the following: |
Beta Was this translation helpful? Give feedback.
Yes, either in code, or within a Blazor component. The
PropertyInfo
type is designed to be a control used in a razor component (or page).For example, in the BlazorExample sample, in the Client project's Shared folder you can see a razor component using it.
https://github.com/MarimerLLC/csla/blob/main/Samples/BlazorExample/BlazorExample/Client/Shared/TextInput.razor
Perhaps a better example is in ProjectTracker (although old, I think it remains valid), where a row is rendered, including the friendly name.
https://github.com/MarimerLLC/csla/blob/main/Samples/ProjectTracker/ProjectTracker.Ui.Blazor/Shared/TextInputRow.razor