Class RadzenCheckBoxList<TValue>
RadzenCheckBoxList component.
public class RadzenCheckBoxList<TValue> : FormComponent<IEnumerable<TValue>>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Type Parameters
TValue
The type of the value.
- Inheritance
-
FormComponent<IEnumerable<TValue>>RadzenCheckBoxList<TValue>
- Implements
- Inherited Members
Examples
<RadzenCheckBoxList @bind-Value=@checkedValues TValue="int" >
<Items>
<RadzenCheckBoxListItem Text="Orders" Value="1" />
<RadzenCheckBoxListItem Text="Employees" Value="2" />
</Items>
</RadzenCheckBoxList>
Constructors
RadzenCheckBoxList()
public RadzenCheckBoxList()
Properties
AllowSelectAll
Gets or sets a value indicating whether the user can select all values. Set to false
by default.
[Parameter]
public bool AllowSelectAll { get; set; }
Property Value
- bool
true
if select all values is allowed; otherwise,false
.
Data
Gets or sets the data used to generate items.
[Parameter]
public virtual IEnumerable Data { get; set; }
Property Value
- IEnumerable
The data.
DisabledProperty
Gets or sets the disabled property.
[Parameter]
public string DisabledProperty { get; set; }
Property Value
- string
The disabled property.
HasValue
Gets a value indicating whether this instance has value.
public override bool HasValue { get; }
Property Value
- bool
true
if this instance has value; otherwise,false
.
Items
Gets or sets the items that will be concatenated with generated items from Data.
[Parameter]
public RenderFragment Items { get; set; }
Property Value
- RenderFragment
The items.
Orientation
Gets or sets the orientation.
[Parameter]
public Orientation Orientation { get; set; }
Property Value
- Orientation
The orientation.
ReadOnly
Gets or sets a value indicating whether is read only.
[Parameter]
public bool ReadOnly { get; set; }
Property Value
- bool
true
if is read only; otherwise,false
.
ReadOnlyProperty
Gets or sets the read-only property.
[Parameter]
public string ReadOnlyProperty { get; set; }
Property Value
- string
The read-only property.
SelectAllText
Gets or sets the select all text.
[Parameter]
public string SelectAllText { get; set; }
Property Value
- string
The select all text.
TextProperty
Gets or sets the text property.
[Parameter]
public string TextProperty { get; set; }
Property Value
- string
The text property.
ValueProperty
Gets or sets the value property.
[Parameter]
public string ValueProperty { get; set; }
Property Value
- string
The value property.
Methods
AddItem(RadzenCheckBoxListItem<TValue>)
Adds the item.
public void AddItem(RadzenCheckBoxListItem<TValue> item)
Parameters
item
RadzenCheckBoxListItem<TValue>The item.
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
GetComponentCssClass()
protected override string GetComponentCssClass()
Returns
IsSelected(RadzenCheckBoxListItem<TValue>)
Determines whether the specified item is selected.
protected bool IsSelected(RadzenCheckBoxListItem<TValue> item)
Parameters
item
RadzenCheckBoxListItem<TValue>The item.
Returns
- bool
true
if the specified item is selected; otherwise,false
.
RemoveItem(RadzenCheckBoxListItem<TValue>)
Removes the item.
public void RemoveItem(RadzenCheckBoxListItem<TValue> item)
Parameters
item
RadzenCheckBoxListItem<TValue>The item.
SelectItem(RadzenCheckBoxListItem<TValue>)
Selects the item.
protected Task SelectItem(RadzenCheckBoxListItem<TValue> item)
Parameters
item
RadzenCheckBoxListItem<TValue>The item.