Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MudBlazor d-flex column values

$
0
0

I am attempting to use variables in classes and column widths in a MudItem.The source is a database record. The objective is to make the page dynamic, sourced from the database. The following line requires the "mColumns" to be an integer, but is originally a string. Is there a way I can convert mColumns to a string in this mark-up?

<MudItem id="@MyQuestion.Key" xs="12" sm="@mColumns" class="@MyQuestion.ControlCss" style="@MyQuestion.Style"> <label>@MyQuestion.Value</label> </MudItem>

I tried converting mColumns to an integer and it worked, but I am ultimately hoping to use the source string.I also tried using "MudElement" instead which allowed the use of the string. Is there an advantage to using "MudItem" over "MudElement"?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>