JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums General Discussions Is there a simple way to add Smart.dropdownlist to an existing Blazorise applica

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #103518

    We’ve got several Blazorise applications.  I’m looking into using Smart UI in some of them.  I’m getting a bunch of errors like,

    Error (active) CS0104 ‘Button’ is an ambiguous reference between ‘Smart.Blazor.Button’ and ‘Blazorise.Button’ PCT.ChemLab

    Is there a simple way to avoid these errors?  Can they play nicely with each other?




    You can add it to your code as Smart.Blazor.Button to avoid ambiguous usage.

    Best regards,
    Peter Stoev

    Smart UI Team


    I did that and it solved the compilation issue.  Thank you.

    I installed the Smart.Blazor NuGet package and followed the instructions on this site.  I/We have not purchased the library (yet).  Not sure if the issues are due to not having a license.   I would like to try it out before we purchase it.  We’re looking for a drop down that supports multiple selection.

    I’m assuming I’m doing something wrong, but not sure what at this point.  Currently, I’m getting System.InvalidOperationException: ‘Cannot get the value of a token type ‘Null’ as a boolean.’ when the page loads.

    <Smart.Blazor.DropDownList DataSource=”@chemLabAlertEmailsSelectArray”
    @foreach (var alertEmail in chemLabAlertEmails)
    <Smart.Blazor.ListItem Value=”alertEmail.AlertEmailAddress”>@alertEmail.AlertEmailAddress</Smart.Blazor.ListItem>

    chemLabAlertEmails is a List not an array but changing it to an array changes nothing.

    Any ideas?



    With the DropDownList, you should choose whether to create it with the DataSource property set or you will add the ListItem elements. It is not possible to have both things at the same place.

    For example:

        <DropDownList @bind-SelectedIndexes="selectedIndexes" DataSource="dataSource" Filterable></DropDownList>
    @code {
        private int[] selectedIndexes = new int[] { 0 };
        private List<string> dataSource = new List<string>()
            "Café Bombón",
            "Café au lait",
            "Caffé Corretto",
            "Café Crema",
            "Caffé Latte",
            "Caffé macchiato",
            "Café mélange",
            "Coffee milk",
            "Cafe mocha",
            "Cuban espresso",
            "The Flat White",
            "Greek frappé coffee",
            "Indian filter coffee",
            "Instant coffee",
            "Irish coffee",
            "Liqueur coffee"

    Best regards,
    Peter Stoev

    Smart UI Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.