Class RadzenTextBox
An input component for single line text entry.
Inheritance
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenTextBox : FormComponentWithAutoComplete<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Examples
<RadzenTextBox @bind-Value=@value Change=@(args => Console.WriteLine($"Value: {args}")) />
Constructors
RadzenTextBox()
An input component for single line text entry.
Declaration
public RadzenTextBox()
Examples
<RadzenTextBox @bind-Value=@value Change=@(args => Console.WriteLine($"Value: {args}")) />
Properties
Immediate
Gets or sets a value indicating whether the component should update the value immediately when the user types. Set to false
by default.
Declaration
[Parameter]
public bool Immediate { get; set; }
Property Value
Type | Description |
---|---|
bool |
MaxLength
Gets or sets the maximum allowed text length.
Declaration
[Parameter]
public long? MaxLength { get; set; }
Property Value
Type | Description |
---|---|
long? | The maximum length. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
[Parameter]
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Trim
Specifies whether to remove any leading or trailing whitespace from the value. Set to false
by default.
Declaration
[Parameter]
public bool Trim { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Methods
BuildRenderTree(RenderTreeBuilder)
An input component for single line text entry.
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
GetId()
Gets the unique identifier.
Declaration
protected override string GetId()
Returns
Type | Description |
---|---|
string | Returns the |
Overrides
OnChange(ChangeEventArgs)
Handles change event of the built-in input
element.
Declaration
protected Task OnChange(ChangeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
ChangeEventArgs | args |
Returns
Type | Description |
---|---|
Task |