How to use ViewModel / GetPropertyInfo with an Editable List? #2785
Unanswered
mtavares628
asked this question in
Questions
Replies: 1 comment
-
The viewmodel types in the Csla.Blazor namespace are designed with a 1:1 concept in mind - so 1 viewmodel for each 1 domain object. You can pass in the list and wrap it in a viewmodel, or pass in a pre-existing viewmodel for the list. You'll then want to wrap each child object with a viewmodel. The easiest way to do this is to have the parent (list) viewmodel expose a list of child viewmodels. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a custom blazor component for an Editable List, but need some guidance. The component will be a sort of checkbox list with textboxes to go with certain checkbox items. So I would like to pass my editable list as a parameter to the component, and have the component iterate through the list of child items and bind checkboxes and textboxes to each child item. I would like to take advantage of using the ViewModel and its GetPropertyInfo methods to perform those bindings, but I'm not sure exactly how to do that. Would I inject the ViewModel with the Editable List or the Editable Child? And if injecting the Editable List, is there a way to call GetPropertyInfo so that it grabs the property on the Editable Child?
Beta Was this translation helpful? Give feedback.
All reactions