Class SfDataBoundComponent
Represents the base component for all Syncfusion Blazor data-bound components. Provides common functionality for data binding, data operations, and component lifecycle management.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor
Assembly: Syncfusion.Blazor.dll
Syntax
public abstract class SfDataBoundComponent : SfBaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
SfDataBoundComponent()
Declaration
protected SfDataBoundComponent()
Properties
DataManager
Gets or sets the DataManager instance for data operations.
Declaration
[JsonIgnore]
public DataManager? DataManager { get; set; }
Property Value
| Type |
|---|
| DataManager |
MainParent
Gets or sets the main parent component reference.
Declaration
protected virtual SfBaseComponent? MainParent { get; set; }
Property Value
| Type |
|---|
| SfBaseComponent |
Methods
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | firstRender | Set to |
Returns
| Type | Description |
|---|---|
| Task | A Task representing any asynchronous operation. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing any asynchronous operation. |
Overrides
SetDataManager<T>(object)
Sets up the DataManager for the component based on the provided data source.
Declaration
protected object SetDataManager<T>(object dataSource)
Parameters
| Type | Name | Description |
|---|---|---|
| object | dataSource | The data source to bind. Can be an IEnumerable, IQueryable, or a DataManager instance. |
Returns
| Type | Description |
|---|---|
| object | The configured DataManager instance or the original data source if it's already a DataManager. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the data source elements. |