Replies: 2 comments 2 replies
-
Ok have managed to work out the syntax thanks to Blazor.Boilerplate, their latest template uses MudBlazor extensively and i was able to find an example of how to use the correct syntax |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi, Regards |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Can you please assist with the correctv syntax to allow a Seelct to be populated from a list of values (the online example isn't really clear when trying to populate values from a database), when I try mine and build solution i keep getting a "Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type" (error is in line 171 of attached file). I know this is something to do with the way the line is added. My code is below which shows no errors until a build is performed.
<MudTextField Label="Summary" Class="mt-3" @bind-Value="Book.Summary" For="@(() => Book.Summary)" /> <MudSelect @bind-Value="Authors" Label="Select Author" HelperText="Enum" OpenIcon="@Icons.Material.Filled.People" AdornmentColor="Color.Secondary"> @foreach (AuthorReadOnlyDto author in Authors(typeof(AuthorReadOnlyDto))) { <MudSelectItem Value="@author">@author</MudSelectItem> } </MudSelect> </MudCardContent>
` private BookCreateDto Book = new BookCreateDto();
private List Authors = new();
Any help would be greatly appreciated.
Regards
Peter
Beta Was this translation helpful? Give feedback.
All reactions