Class RadzenSelectBar<TValue>
RadzenSelectBar component.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenSelectBar<TValue> : FormComponent<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent, IRadzenSelectBar
Type Parameters
Name | Description |
---|---|
TValue | The type of the value. |
Examples
<RadzenSelectBar @bind-Value=@values TValue="IEnumerable<int>" Multiple="true">
<Items>
<RadzenSelectBarItem Text="Orders" Value="1" />
<RadzenSelectBarItem Text="Employees" Value="2" />
<RadzenSelectBarItem Text="Customers" Value="3" />
</Items>
</RadzenSelectBar>
Constructors
RadzenSelectBar()
RadzenSelectBar component.
Declaration
public RadzenSelectBar()
Examples
<RadzenSelectBar @bind-Value=@values TValue="IEnumerable<int>" Multiple="true">
<Items>
<RadzenSelectBarItem Text="Orders" Value="1" />
<RadzenSelectBarItem Text="Employees" Value="2" />
<RadzenSelectBarItem Text="Customers" Value="3" />
</Items>
</RadzenSelectBar>
Properties
Data
Gets or sets the data.
Declaration
[Parameter]
public virtual IEnumerable Data { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable | The data. |
HasValue
Gets a value indicating whether this instance has value.
Declaration
public override bool HasValue { get; }
Property Value
Type | Description |
---|---|
bool |
|
Overrides
Items
Gets or sets the items.
Declaration
[Parameter]
public RenderFragment Items { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The items. |
Multiple
Gets or sets a value indicating whether this RadzenSelectBar<TValue> is multiple.
Declaration
[Parameter]
public bool Multiple { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Orientation
Gets or sets the orientation. Set to Orientation.Horizontal
by default.
Declaration
[Parameter]
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation | The orientation. |
Size
Gets or sets the size. Set to ButtonSize.Medium
by default.
Declaration
[Parameter]
public ButtonSize Size { get; set; }
Property Value
Type | Description |
---|---|
ButtonSize | The size. |
TextProperty
Gets or sets the text property.
Declaration
[Parameter]
public string TextProperty { get; set; }
Property Value
Type | Description |
---|---|
string | The text property. |
ValueProperty
Gets or sets the value property.
Declaration
[Parameter]
public string ValueProperty { get; set; }
Property Value
Type | Description |
---|---|
string | The value property. |
Methods
AddItem(RadzenSelectBarItem)
Adds the item.
Declaration
public void AddItem(RadzenSelectBarItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenSelectBarItem | item | The item. |
BuildRenderTree(RenderTreeBuilder)
RadzenSelectBar component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
string |
Overrides
IsSelected(RadzenSelectBarItem)
Determines whether the specified item is selected.
Declaration
protected bool IsSelected(RadzenSelectBarItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenSelectBarItem | item | The item. |
Returns
Type | Description |
---|---|
bool |
|
OnParametersSet()
RadzenSelectBar component.
Declaration
protected override void OnParametersSet()
Overrides
Refresh()
Refreshes this instance.
Declaration
public void Refresh()
RemoveItem(RadzenSelectBarItem)
Removes the item.
Declaration
public void RemoveItem(RadzenSelectBarItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenSelectBarItem | item | The item. |
SelectItem(RadzenSelectBarItem)
Selects the item.
Declaration
protected Task SelectItem(RadzenSelectBarItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenSelectBarItem | item | The item. |
Returns
Type | Description |
---|---|
Task |