« Radzen » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
[[Category:Blazor]]
[[Category:Blazor]]
= Links =
* [https://github.com/radzenhq/radzen-blazor Radzen Blazor on Github]
* [https://github.com/radzenhq/radzen-examples Examples]
= [https://blazor.radzen.com/checkboxlist CheckBoxList] =
= [https://blazor.radzen.com/checkboxlist CheckBoxList] =
<filebox fn='MyPage.razor'>
<filebox fn='MyPage.razor'>

Version du 29 mai 2021 à 15:23

Links

CheckBoxList

MyPage.razor
<RadzenCheckBoxList @bind-Value="@selectedItemIds"
                    TValue="int"
                    Data="@items"
                    TextProperty="Name"
                    ValueProperty="Id" />
MyPage.razor.cs
// has to be an IEnumerable
private IEnumerable<int> selectedItemIds;

private IReadOnlyCollection<ItemDto> items;

Numeric

MyPage.razor
<RadzenNumeric TValue="int?"
               Min="1"
               Max="10"
               @bind-Value=@value
               Placeholder="Enter or clear value" />
MyPage.razor.cs
int? value;

Installation

Bash.svg
dotnet add package Radzen.Blazor
_Imports.razor
@using Radzen
@using Radzen.Shared
@using Radzen.Blazor
_Host.cshtml
<head>
    <link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css">

@* ... *@

    <script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
</body>