Skip to content

Programatic FluentComboBox in C#? #212

Closed Answered by vnbaaij
thoffmann-fms asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
You can do it like this:

<h2>From list of string items</h2>
<FluentCombobox Options=@stringOptions />

<h2>From list of int items</h2>
<FluentCombobox Options=@intOptions />

@code{
    List<Option<string>> stringOptions = new()
        {
            { new Option<string> { Key = "1", Value = "One" } },
            { new Option<string> { Key = "2", Value = "Two", Selected = true } },
            { new Option<string> { Key = "3", Value = "Three" } }

        };

    List<Option<int>> intOptions = new()
        {
            { new Option<int> { Key = 1, Value = 1, Disabled = true } },
            { new Option<int> { Key = 2, Value = 2 } },
            { new Option<int> { Key = 3, Value =…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by vnbaaij
Comment options

You must be logged in to vote
4 replies
@vnbaaij
Comment options

@thoffmann-fms
Comment options

@vnbaaij
Comment options

@thoffmann-fms
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants