Class SfInPlaceEditor<TValue>
The In-place Editor component is most useful for editing a value dynamically within its context (in-place). It has the built-in support to handle all the form components, including TextBox, Dropdown List, DatePicker, and Rich Text Editor. The component comes with different edit modes and a fully customizable UI.
Inherited Members
Namespace: Syncfusion.Blazor.InPlaceEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfInPlaceEditor<TValue> : SfBaseComponent, IInPlaceEditor
Type Parameters
Name | Description |
---|---|
TValue | Represents the Inplace Editor data source's type. |
Constructors
SfInPlaceEditor()
Declaration
public SfInPlaceEditor()
Properties
ActionOnBlur
Specifies the action that is performed when we focus-out from the In-place Editor. It can be a Submit or Cancel or Ignore action.
Declaration
public ActionBlur ActionOnBlur { get; set; }
Property Value
Type | Description |
---|---|
ActionBlur | Represents the action that is performed when the In-place Editor loses focus. |
Adaptor
Specifies the adaptor type that is used by the DataManager to communicate with DataSource.
Declaration
public Adaptors Adaptor { get; set; }
Property Value
Type | Description |
---|---|
Adaptors | Represents the type of adaptor used by the DataManager to communicate with the data source. |
ChildContent
Gets or sets the content of the InPlace Editor element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | Accepts a RenderFragment that defines the content of the UI element. |
CssClass
Defines single or multiple classes (separated by space) to be used to customize the In-place Editor.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the CSS class string separated by space to customize the appearance of component. |
Disabled
Specifies whether to enable or disable the In-place Editor.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EditableOn
Specifies whether to enable or disable the editing mode.
Declaration
public EditableType EditableOn { get; set; }
Property Value
Type | Description |
---|---|
EditableType | Represents the editing mode enabled in in-place editor component. The default option is Click. |
EmptyText
Sets the text to be shown when a component is Empty.
Declaration
public string EmptyText { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
EnableEditMode
Specifies to show and hide the editing mode.
Declaration
public bool EnableEditMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRtl
Enable or disable the rendering component in the right to left (RTL) direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HtmlAttributes
You can add the additional Html attributes such as id, title, etc., to the InPlaceEditor element.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | A dictionary of additional HTML attributes for the root element of the InPlaceEditor. |
ID
Overridden.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
InPlaceEditContext
Declaration
protected EditContext InPlaceEditContext { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.Forms.EditContext |
Mode
Specifies how to render its components whether in inline or popup mode while editing in the In-place Editor.
Declaration
public RenderMode Mode { get; set; }
Property Value
Type | Description |
---|---|
RenderMode | One of the RenderMode enumeration. The default value is Inline. |
Name
Specifies the name of the component which is used to retrieve data from the server. If the name is not given, then the component ID will be considered as the mapping name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
PrimaryKey
Defines the unique key of an editable field that can be used for saving data in the Database.
Declaration
public string PrimaryKey { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
SaveUrl
Specifies the server URL which triggers on submit action in the In-place Editor.
Declaration
public string SaveUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
ShowButtons
Specifies whether to show or hide the Save and Cancel buttons of the In-place Editor.
Declaration
public bool ShowButtons { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SubmitOnEnter
Enables to trigger the submit action when the enter key is pressed.
Declaration
public bool SubmitOnEnter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Type
Specifies the component which is rendered within the In-place Editor.
Declaration
public InputType Type { get; set; }
Property Value
Type | Description |
---|---|
InputType | The type of component which is configured in the In-place Editor. |
Value
Specifies the display value for the component when the original value is empty.
Declaration
public TValue Value { get; set; }
Property Value
Type | Description |
---|---|
TValue | Display value of the component. |
ValueChanged
Specifies the callback to trigger when the value changes in the In-place Editor.
Declaration
public EventCallback<TValue> ValueChanged { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<TValue> |
ValueExpression
Specifies the expression for defining the value of the bound.
Declaration
public Expression<Func<TValue>> ValueExpression { get; set; }
Property Value
Type |
---|
System.Linq.Expressions.Expression<System.Func<TValue>> |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true if this is the first time OnAfterRender(Boolean) has been invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
SaveAsync()
Submit the edited input value to the server.
Declaration
public Task SaveAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |