Open Closed

Add multiselect with select all option using blazorise #952


User avatar
0
safi created

Hi

I want to add multi select dropdownlist with select all option. I tried to use select tag with multiple =true property so it's working but wants to add checkboxes as well with select all option. Please suggest me solution for the same.

Thanks,


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you explain this in detail? and share some code.

  • User Avatar
    0
    safi created

    Hi

    I am using below code to show dropdown list and by using this code I am able to select multiple items from list.

    <Select TValue="string" SelectedValues="@editcountries" SelectedValuesChanged="ChangeCountriesCallback" Multiple="true">
        <SelectItem TValue="string" Value="null"></SelectItem>
            @foreach (var country in SelectedCountries)
            {
                <SelectItem TValue="string" Value="@(country.Key)">
                    @country.Value
                </SelectItem>
        }
    </Select>
    

    But now, I want to add multi select with checkbox this functionality so please suggest me.

    Thanks,

  • User Avatar
    0
    mladen.macanovic created

    Hi @safi,

    Multiselect with checkboxes is not supported in Blazorise. You can try building your own custom component by using other parts of Blazorise. Here I will show you one example using Dropdown and Check boxes.

    <Dropdown>
        <DropdownToggle Color="Color.Primary">Menu</DropdownToggle>
        <DropdownMenu>
            <Check TValue="bool">One</Check>
            <Check TValue="bool">Two</Check>
            <Check TValue="bool">Three</Check>
            <Check TValue="bool">Four</Check>
        </DropdownMenu>
    </Dropdown>
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11