Class TreeGridEvents<TValue>
Configures Tree Grid events.
Inheritance
Namespace: Syncfusion.Blazor.TreeGrid
Assembly: Syncfusion.Blazor.dll
Syntax
public class TreeGridEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | A type which provides schema for the tree grid events. |
Constructors
TreeGridEvents()
Declaration
public TreeGridEvents()
Properties
BeforeBatchAdd
An event that is raised before new records are added in batch mode.
Declaration
public EventCallback<object> BeforeBatchAdd { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object argument which provides the details of before batch add action.
Examples
<SfTreeGrid>
<TreeGridEvents BeforeBatchAdd="BeforeBatchAddHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BeforeBatchAddHandler(object args)
{
}
}
BeforeBatchDelete
An event that is raised before the tree grid records are deleted in batch mode.
Declaration
public EventCallback<object> BeforeBatchDelete { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object argument which provides the details of before batch delete action.
Examples
<SfTreeGrid>
<TreeGridEvents BeforeBatchDelete="BeforeBatchDeleteHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BeforeBatchDeleteHandler(object args)
{
}
}
BeforeBatchSave
An event that is raised before the modified records are saved in batch mode.
Declaration
public EventCallback<object> BeforeBatchSave { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object argument which provides the details of before batch save action.
Examples
<SfTreeGrid>
<TreeGridEvents BeforeBatchSave="BeforeBatchSaveHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BeforeBatchSaveHandler(object args)
{
}
}
BeforeCellPaste
An event that is raised before pasting the copied cell value in a corresponding cells. You can cancel the paste on a particular cell by handling this event.
Declaration
public EventCallback<BeforeCellPasteEventArgs<TValue>> BeforeCellPaste { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeCellPasteEventArgs<TValue>> |
Remarks
This event handler receives a BeforeCellPasteEventArgs<T> object which provides the details for the before cell paste action. Paste event action can be cancelled by setting Cancel
property of BeforeCellPasteEventArgs<T> property.
Examples
<SfTreeGrid DataSource="@TreeData" @ref="TreeGrid" >
<TreeGridEvents TValue="BusinessObject" BeforeCellPaste="CellPaste"></TreeGridEvents>
</SfTreeGrid>
@code{
public async Task Paste(BeforeCellPasteEventArgs<BusinessObject> args)
{
if(ColumnIndex == 1 && RowIndex == 4){
//you can modified the content to be paste here.
args.CellValue = "Modified value";
}
}
BeforeCopyPaste
An event that is raised before copy or paste action in the Grid cells. You can cancel the copy or paste action by cancelling this event.
Declaration
public EventCallback<BeforeCopyPasteEventArgs> BeforeCopyPaste { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeCopyPasteEventArgs> |
Remarks
This event triggers before BeforeCellPaste event, so you can cancel copy or paste operation by using this event. Also, this event handler receives a BeforeCopyPasteEventArgs object which provides the details of before paste/copy action.
Examples
<SfTreeGrid DataSource="@TreeData" @ref="TreeGrid" >
<TreeGridEvents BeforeCopyPaste="CopyPaste"></TreeGridEvents>
</SfTreeGrid>
@code{
public async Task CopyPaste(BeforeCopyPasteEventArgs args)
{
//you can cancel the entire copy action here
if(args.Action == "Copy"){
args.Cancel = true;
}
//you can cancel the entire paste action here
if(args.Action == "Paste"){
args.Cancel = true;
}
}
CellDeselected
An event that is raised after any cell deselection occurs.
Declaration
public EventCallback<CellDeselectEventArgs<TValue>> CellDeselected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellDeselectEventArgs<TValue>> |
Remarks
This event handler receives a CellDeselectEventArgs<T> object through which you can able to get deselected cell and row details.
Examples
<SfTreeGrid>
<TreeGridSelectionSettings Mode=SelectionMode.Cell></TreeGridSelectionSettings>
<TreeGridEvents CellDeselected="CellDeselectedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellDeselectedHandler(CellDeselectEventArgs<BusinessObject> args)
{
}
}
CellDeselecting
An event that is raised when any cell deselection occurs.
Declaration
public EventCallback<CellDeselectEventArgs<TValue>> CellDeselecting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellDeselectEventArgs<TValue>> |
Remarks
This event handler receives a CellDeselectEventArgs<T> object through which you can be able to get the details of the cell to be deselected.
Examples
<SfTreeGrid>
<TreeGridSelectionSettings Mode=SelectionMode.Cell></TreeGridSelectionSettings>
<TreeGridEvents CellDeselecting="CellDeselectingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellDeselectingHandler(CellDeselectEventArgs<BusinessObject> args)
{
}
}
CellSaved
An event that is raised after the modified cell value is saved.
Declaration
public EventCallback<CellSaveArgs<TValue>> CellSaved { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellSaveArgs<TValue>> |
Remarks
This event handler receives a CellSaveArgs<T> object through which you can get previous and current edited cell values.
Examples
<SfTreeGrid>
<TreeGridEvents CellSaved="CellSavedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellSavedHandler(CellSaveArgs<BusinessObject> args)
{
}
}
CellSelected
An event that is raised after a cell is selected.
Declaration
public EventCallback<CellSelectEventArgs<TValue>> CellSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellSelectEventArgs<TValue>> |
Remarks
This event handler receives a CellSelectEventArgs<T> object through which you can able to get the selected cell and row details.
Examples
<SfTreeGrid>
<TreeGridSelectionSettings Mode=SelectionMode.Cell></TreeGridSelectionSettings>
<TreeGridEvents CellSelected="CellSelectedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellSelectedHandler(CellSelectEventArgs<BusinessObject> args)
{
}
}
CellSelecting
An event that is raised when any cell selection occurs.
Declaration
public EventCallback<CellSelectingEventArgs<TValue>> CellSelecting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellSelectingEventArgs<TValue>> |
Remarks
This event handler receives a CellSelectingEventArgs<T> object through which you can get current selected cell and row details. Cell selection action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridSelectionSettings Mode=SelectionMode.Cell></TreeGridSelectionSettings>
<TreeGridEvents CellSelecting="CellSelectingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellSelectingHandler(CellSelectingEventArgs<BusinessObject> args)
{
}
}
CheckboxChange
An event that is raised when checkbox column state changed.
Declaration
public EventCallback<CheckBoxChangeEventArgs<TValue>> CheckboxChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CheckBoxChangeEventArgs<TValue>> |
Remarks
This event handler receives a CheckBoxChangeEventArgs<T> object which provides the details of checkbox column state with the corresponding record and column details.
Examples
<SfTreeGrid>
<TreeGridEvents CheckboxChange="CheckboxChangeHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CheckboxChangeHandler(CheckBoxChangeEventArgs<BusinessObject> args)
{
}
}
Collapsed
An event that is raised after the tree grid parent row is collapsed.
Declaration
public EventCallback<RowCollapsedEventArgs<TValue>> Collapsed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowCollapsedEventArgs<TValue>> |
Remarks
This event handler receives a RowCollapsedEventArgs<T> object which provides the details of parent and child rows.
Examples
<SfTreeGrid>
<TreeGridEvents Collapsed="CollapsedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CollapsedHandler(RowCollapsedEventArgs<BusinessObject> args)
{
}
}
Collapsing
An event that is raised while collapsing the tree grid parent row.
Declaration
public EventCallback<RowCollapsingEventArgs<TValue>> Collapsing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowCollapsingEventArgs<TValue>> |
Remarks
This event handler receives a RowCollapsingEventArgs<T> object which provides the details of parent and child rows. Row collapse action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridEvents Collapsing="CollapsingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CollapsingHandler(RowCollapsingEventArgs<BusinessObject> args)
{
}
}
ColumnMenuItemClicked
An event that is raised after clicking on column menu.
Declaration
public EventCallback<ColumnMenuClickEventArgs> ColumnMenuItemClicked { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColumnMenuClickEventArgs> |
Remarks
This event handler receives a ColumnMenuClickEventArgs object through which you can able to get the corresponding menu item and column details through event argument.
Examples
<SfTreeGrid ShowColumnMenu="true">
<TreeGridEvents ColumnMenuItemClicked="ColumnMenuItemClickedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ColumnMenuItemClickedHandler(ColumnMenuClickEventArgs args)
{
}
}
CommandClicked
An event that is raised when command button is clicked in tree grid column.
Declaration
public EventCallback<CommandClickEventArgs<TValue>> CommandClicked { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CommandClickEventArgs<TValue>> |
Remarks
This event handler receives a CommandClickEventArgs<T> object through which you can get the corresponding command column and row details.
Examples
<SfTreeGrid ShowColumnMenu="true">
<TreeGridEvents CommandClicked="OnCommandClicked" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void OnCommandClicked(CommandClickEventArgs<BusinessObject> args)
{
}
}
ContextMenuItemClicked
An event that is raised after clicking an item on context menu.
Declaration
public EventCallback<ContextMenuClickEventArgs<TValue>> ContextMenuItemClicked { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ContextMenuClickEventArgs<TValue>> |
Remarks
This event handler receives a ContextMenuClickEventArgs<T> object through which you can get the corresponding menu item, column and row details through event argument. Custom actions for custom context menu items can be performed here.
Examples
<SfTreeGrid ContextMenuItems="@(new List<object>() { "AutoFit", "AutoFitAll", "SortAscending", "SortDescending","Copy", "Edit",
"Delete", "Save", "Cancel","PdfExport", "ExcelExport", "CsvExport", "FirstPage", "PrevPage","LastPage", "NextPage"})" >
<TreeGridEvents ContextMenuItemClicked="ContextMenuItemClickedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ContextMenuItemClickedHandler(ContextMenuClickEventArgs args)
{
}
}
ContextMenuOpen
An event that is raised when context menu is opened.
Declaration
public EventCallback<ContextMenuOpenEventArgs<TValue>> ContextMenuOpen { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ContextMenuOpenEventArgs<TValue>> |
Remarks
This event handler receives a ContextMenuOpenEventArgs<T> object through which you can get context menu instance through event argument so you can able to customize the context menu items.
Examples
<SfTreeGrid ContextMenuItems="@(new List<object>() { "AutoFit", "AutoFitAll", "SortAscending", "SortDescending","Copy", "Edit",
"Delete", "Save", "Cancel","PdfExport", "ExcelExport", "CsvExport", "FirstPage", "PrevPage","LastPage", "NextPage"})" >
<TreeGridEvents ContextMenuOpen="ContextMenuOpenHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ContextMenuOpenHandler(ContextMenuOpenEventArgs<BusinessObject> args)
{
}
}
Created
An event that is raised when the component is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object which provides the details of created tree grid component.
Examples
<SfTreeGrid>
<TreeGridEvents Created="CreatedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CreatedHandler(object args)
{
}
}
DataBound
An event that is raised when data source is populated in the tree grid.
Declaration
public EventCallback<object> DataBound { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object which provides the current view data and its count.
Examples
<SfTreeGrid>
<TreeGridEvents DataBound="DataBoundHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void DataBoundHandler(object args)
{
}
}
Destroyed
An event that is raised when the tree grid component is destroyed.
Declaration
public EventCallback<object> Destroyed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object which provides the details of the component.
Examples
<SfTreeGrid>
<TreeGridEvents Destroyed="DestroyHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void DestroyHandler(object args)
{
}
}
DetailDataBound
An event that is raised after detail row expands.
Declaration
public EventCallback<DetailDataBoundEventArgs<TValue>> DetailDataBound { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<DetailDataBoundEventArgs<TValue>> |
Remarks
This event handler receives a DetailDataBoundEventArgs<T> object which provides the details of the row.
Examples
<SfTreeGrid>
<TreeGridEvents DetailDataBound="DetailDataBoundHandler" TValue="Employee"></TreeGridEvents>
</SfTreeGrid>
@code {
public void DetailDataBoundHandler(DetailDataBoundEventArgs<Employee> args)
{
}
}
ExcelQueryCellInfoEvent
An even that is raised every time a data is entered into a cell of the excel sheet.
Declaration
public EventCallback<ExcelQueryCellInfoEventArgs<TValue>> ExcelQueryCellInfoEvent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ExcelQueryCellInfoEventArgs<TValue>> |
Remarks
This event handler receives a ExcelQueryCellInfoEventArgs<T> object which provides the details before the tree grid data is exported to the Excel file. It can be used to customize the tree grid content in Excel file.
Examples
<SfTreeGrid AllowExcelExport="true" Toolbar="@(new List<string>() { "Excel Export" })">
<TreeGridEvents ExcelQueryCellInfoEvent="ExcelQueryCellInfoHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
SfTreeGrid<BusinessObject> TreeGrid;
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs Args)
{
if (Args.Item.Text == "Excel Export")
{
await this.TreeGrid.ExcelExport();
}
}
public void RowSelectedHandler(RowSelectEventArgs<BusinessObject> args)
{
}
}
Expanded
An event that is raised after the tree grid parent row is expanded.
Declaration
public EventCallback<RowExpandedEventArgs<TValue>> Expanded { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowExpandedEventArgs<TValue>> |
Remarks
This event handler receives a RowExpandedEventArgs<T> object which provides the details of the parent and child rows.
Examples
<SfTreeGrid>
<TreeGridEvents Expanded="ExpandedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ExpandedHandler(RowExpandedEventArgs<BusinessObject> args)
{
}
}
Expanding
An event that is raised while expanding the tree grid parent row.
Declaration
public EventCallback<RowExpandingEventArgs<TValue>> Expanding { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowExpandingEventArgs<TValue>> |
Remarks
This event handler receives a RowExpandingEventArgs<T> object which provides the details of parent and child rows. Row expand action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridEvents Expanding="ExpandingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ExpandingHandler(RowExpandingEventArgs<BusinessObject> args)
{
}
}
FreezeLineMoved
Gets or sets an event callback that is raised after moved freeze line.
Declaration
public EventCallback<FreezeLineMovedEventArgs> FreezeLineMoved { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FreezeLineMovedEventArgs> |
Remarks
This event handler receives a FreezeLineMovedEventArgs object which provides the details after frozen line moved.
Examples
<SfTreeGrid>
<TreeGridEvents FreezeLineMoved="FreezeLineMovedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void FreezeLineMovedHandler(FreezeLineMoving args)
{
}
}
FreezeLineMoving
Gets or sets an event callback that is raised on moving freeze line.
Declaration
public EventCallback<FreezeLineMovingEventArgs> FreezeLineMoving { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FreezeLineMovingEventArgs> |
Remarks
This event handler receives a FreezeLineMovingEventArgs object which provides the details when frozen line moving.
Examples
<SfTreeGrid>
<TreeGridEvents FreezeLineMoving="FreezeLineMovingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void FreezeLineMovingHandler(FreezeLineMoving args)
{
}
}
HeaderCellInfo
An event that is raised everytime a header cell is rendered or refreshed in tree grid.
Declaration
public EventCallback<HeaderCellInfoEventArgs> HeaderCellInfo { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<HeaderCellInfoEventArgs> |
Remarks
This event handler receives a HeaderCellInfoEventArgs object which provides the details of header cells in the tree grid so that it can be customized.
Examples
<SfTreeGrid>
<TreeGridEvents HeaderCellInfo="HeaderCellInfoHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void HeaderCellInfoHandler(HeaderCellInfoEventArgs args)
{
}
}
OnActionBegin
An event that is raised when the tree grid actions such as sorting, filtering, paging, and more begins.
Declaration
public EventCallback<ActionEventArgs<TValue>> OnActionBegin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ActionEventArgs<TValue>> |
Remarks
This event handler receives a ActionEventArgs<T> object which provides the details of current tree grid action.
Examples
<SfTreeGrid>
<TreeGridEvents OnActionBegin="ActionBeginHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ActionBeginHandler(ActionEventArgs<BusinessObject> args)
{
}
}
OnActionComplete
An event that is raised when the tree grid actions such as sorting, filtering, paging and more are completed.
Declaration
public EventCallback<ActionEventArgs<TValue>> OnActionComplete { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ActionEventArgs<TValue>> |
Remarks
This event handler receives a ActionEventArgs<T> object which provides the details of current tree grid action.
Examples
<SfTreeGrid>
<TreeGridEvents OnActionComplete="ActionCompleteHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ActionCompleteHandler(ActionEventArgs<BusinessObject> args)
{
}
}
OnActionFailure
An event that is raised when any tree grid action failed to achieve the desired results.
Declaration
public EventCallback<FailureEventArgs> OnActionFailure { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FailureEventArgs> |
Remarks
This event handler receives a FailureEventArgs object which provides details of the error in Tree Grid. Stack trace of exceptions, if any, can also be obtained here.
Examples
<SfTreeGrid>
<TreeGridEvents OnActionFailure="ActionFailureHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ActionFailureHandler(FailureEventArgs args)
{
}
}
OnBatchAdd
An event that is raised when the tree grid records are added in the batch mode.
Declaration
public EventCallback<BeforeBatchAddArgs<TValue>> OnBatchAdd { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeBatchAddArgs<TValue>> |
Remarks
This event handler receives a BeforeBatchAddArgs<T> object. Based on this, you can customize the batch add operation.
Examples
<SfTreeGrid>
<TreeGridEvents OnBatchAdd="BatchAddHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BatchAddHandler(BeforeBatchAddArgs<BusinessObject> args)
{
}
}
OnBatchDelete
An event that is raised When the tree grid records are deleted in the batch mode.
Declaration
public EventCallback<BeforeBatchDeleteArgs<TValue>> OnBatchDelete { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeBatchDeleteArgs<TValue>> |
Remarks
This event handler receives a BeforeBatchDeleteArgs<T> object. Based on this, you can get deleted records details or cancel the batch delete action.
Examples
<SfTreeGrid>
<TreeGridEvents OnBatchDelete="BatchDeleteHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BatchDeleteHandler(BeforeBatchDeleteArgs<BusinessObject> args)
{
}
}
OnBatchSave
An event that is raised when the modified records are saved to data source in batch mode.
Declaration
public EventCallback<BeforeBatchSaveArgs<TValue>> OnBatchSave { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeBatchSaveArgs<TValue>> |
Remarks
This event handler receives a BeforeBatchSaveArgs<T> object which provides the details of the changed tree grid records.
Examples
<SfTreeGrid>
<TreeGridEvents OnBatchSave="BatchSaveHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BatchSaveHandler(BeforeBatchSaveArgs<BusinessObject> args)
{
}
}
OnBeginEdit
An event that is raised when tree grid record is beginning to do edit operation.
Declaration
public EventCallback<BeginEditArgs<TValue>> OnBeginEdit { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeginEditArgs<TValue>> |
Remarks
This event handler receives a BeginEditArgs<T> object through which you can be able to get the current edited record details through the event argument. Edit action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridEvents OnBeginEdit="BeginEditHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void BeginEditHandler(BeginEditArgs<BusinessObject> args)
{
}
}
OnCellEdit
An event that is raised when the cell is being edited.
Declaration
public EventCallback<CellEditArgs<TValue>> OnCellEdit { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellEditArgs<TValue>> |
Remarks
This event handler receives a CellEditArgs<T> object through which you can get the corresponding column and edited row details through event argument. Cell edit action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridEvents OnCellEdit="CellEditHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellEditHandler(CellEditArgs<BusinessObject> args)
{
}
}
OnCellSave
An event that is raised when modified cell value is saved.
Declaration
public EventCallback<CellSaveArgs<TValue>> OnCellSave { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CellSaveArgs<TValue>> |
Remarks
This event handler receives a CellSaveArgs<T> object through which you can get previous and current edited cell values so you can be able to customize the cell save action.
Examples
<SfTreeGrid>
<TreeGridEvents OnCellSave="CellSaveHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void CellSaveHandler(CellSaveArgs<BusinessObject> args)
{
}
}
OnDataBound
An event that is raised when data is bound to the tree grid.
Declaration
public EventCallback<BeforeDataBoundArgs<TValue>> OnDataBound { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeDataBoundArgs<TValue>> |
Remarks
This event handler receives a BeforeDataBoundArgs<T> object through which you can able to get currentview data and total records count.
Examples
<SfTreeGrid>
<TreeGridEvents OnDataBound="DataBoundHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void DataBoundHandler(BeforeDataBoundArgs<BusinessObject> args)
{
}
}
OnExcelExport
An event that is raised when the tree grid data is exported to an excel file.
Declaration
public EventCallback<object> OnExcelExport { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object which provides the details of tree grid data and excel properties.
Examples
<SfTreeGrid>
<TreeGridEvents OnExcelExport="ExcelExportHandler" OnToolbarClick="ToolbarClickHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
SfTreeGrid<BusinessObject> TreeGrid;
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs Args)
{
if (Args.Item.Text == "Excel Export")
{
await this.TreeGrid.ExcelExport();
}
}
public void ExcelExportHandler(object args)
{
}
}
OnLoad
An event that is raised before rendering of TreeGrid Component.
Declaration
public EventCallback<object> OnLoad { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a System.Object object which provides the details of the tree grid before initial rendering.
Examples
<SfTreeGrid>
<TreeGridEvents TValue="BusinessObject" OnLoad="LoadHandler"></TreeGridEvents>
</SfTreeGrid>
@code {
public void LoadHandler(object args)
{
}
}
OnPdfExport
An event that is raised when tree grid data is exported to a PDF document.
Declaration
public EventCallback<object> OnPdfExport { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event handler receives a object argument that provides the details on tree grid data and PDF properties.
Examples
<SfTreeGrid>
<TreeGridEvents OnPdfExport="PdfExportHandler" OnToolbarClick="ToolbarClickHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
SfTreeGrid<BusinessObject> TreeGrid;
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs Args)
{
if (Args.Item.Text == "PDF Export")
{
await this.TreeGrid.PdfExport();
}
}
public void PdfExportHandler(object args)
{
}
}
OnRecordDoubleClick
An event that is raised when tree grid row is double clicked.
Declaration
public EventCallback<RecordDoubleClickEventArgs<TValue>> OnRecordDoubleClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RecordDoubleClickEventArgs<TValue>> |
Remarks
This event handler receives a RecordDoubleClickEventArgs<T> object which provides the details of the tree grid row.
Examples
<SfTreeGrid>
<TreeGridEvents OnRecordDoubleClick="RecordDoubleClickHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RecordDoubleClickHandler(RecordDoubleClickEventArgs<BusinessObject> args)
{
}
}
OnResizeStart
An event that is raised when tree grid column resize starts.
Declaration
public EventCallback<ResizeArgs> OnResizeStart { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ResizeArgs> |
Remarks
This event handler receives a ResizeArgs object which provides the details of the resizing column.
Examples
<SfTreeGrid>
<TreeGridEvents OnResizeStart="OnResizeStartHanlder" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void OnResizeStartHanlder(ResizeArgs args)
{
}
}
OnRowDragStart
Gets or sets the event callback that is raised when we start dragging the rows to perform reorder.
Declaration
public EventCallback<RowDragEventArgs<TValue>> OnRowDragStart { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDragEventArgs<TValue>> |
Remarks
This event handler receives a RowDragEventArgs<T> object which provides the details of the rows from which it is dragged.
Examples
<SfTreeGrid DataSource="@TreeData" @ref="TreeGrid">
<TreeGridEvents TValue="BusinessObject" OnRowDragStart="OnRowDragStartHandler"></TreeGridEvents>
........
</SfTreeGrid>
@code{
public async Task OnRowDragStartHandler(RowDragEventArgs<BusinessObject> args)
{
//you can get the dragged row data's here
List<BusinessObject> Data = args.Data;
}
OnToolbarClick
An event that is raised when toolbar item is clicked.
Declaration
public EventCallback<ClickEventArgs> OnToolbarClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ClickEventArgs> |
Remarks
This event handler receives a OnToolbarClick object which provides the details about the toolbar item. Custom actions for custom toolbar items can be performed using this event.
Examples
<SfTreeGrid Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<TreeGridEvents OnToolbarClick="ToolbarClickHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs Args)
{
}
}
Parent
Gets the Parent component.
Declaration
protected SfTreeGrid<TValue> Parent { get; set; }
Property Value
Type | Description |
---|---|
SfTreeGrid<TValue> |
PdfQueryCellInfoEvent
An event that is raised every time a data is entered into a cell of the pdf document.
Declaration
public EventCallback<PdfQueryCellInfoEventArgs<TValue>> PdfQueryCellInfoEvent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<PdfQueryCellInfoEventArgs<TValue>> |
Remarks
This event handler receives a PdfQueryCellInfoEventArgs<T> object which provides the details before the tree grid data is exported to PDF document. It can be used to customize the tree grid content in a PDF document.
Examples
<SfTreeGrid AllowPdfExport="true" Toolbar="@(new List<string>() { "PdfExport" })">
<TreeGridEvents PdfQueryCellInfoEvent="PdfQueryCellInfoHandler" OnToolbarClick="ToolbarClickHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
SfTreeGrid<BusinessObject> TreeGrid;
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs Args)
{
if (Args.Item.Text == "PDF Export")
{
await this.TreeGrid.PdfExport();
}
}
public void PdfQueryCellInfoHandler(PdfQueryCellInfoEventArgs<BusinessObject> args)
{
}
}
QueryCellInfo
An event that is raised every time a tree grid cell is rendered or refreshed.
Declaration
public EventCallback<QueryCellInfoEventArgs<TValue>> QueryCellInfo { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<QueryCellInfoEventArgs<TValue>> |
Remarks
This event handler receives a QueryCellInfoEventArgs<T> object which provides the details of the tree grid cell. Customizations for tree grid cell element can be performed here.
Examples
<SfTreeGrid>
<TreeGridEvents QueryCellInfo="QueryCellInfoHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void QueryCellInfoHandler(QueryCellInfoEventArgs<BusinessObject> args)
{
}
}
ResizeStopped
An event that is raised when tree grid column resize ends.
Declaration
public EventCallback<ResizeArgs> ResizeStopped { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ResizeArgs> |
Remarks
This event handler receives a ResizeArgs object which provides the details of resized column.
Examples
<SfTreeGrid>
<TreeGridEvents ResizeStopped="ResizeStoppedHanlder" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void ResizeStoppedHanlder(ResizeArgs args)
{
}
}
RowDataBound
An event that is raised every time a tree grid row is rendered or refreshed.
Declaration
public EventCallback<RowDataBoundEventArgs<TValue>> RowDataBound { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDataBoundEventArgs<TValue>> |
Remarks
This event handler receives a RowDataBoundEventArgs<T> object which provides the details of the tree grid row. Customizations for tree grid row element can be performed here.
Examples
<SfTreeGrid>
<TreeGridEvents RowDataBound="RowDataBoundHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RowDataBoundHandler(RowDataBoundEventArgs<BusinessObject> args)
{
}
}
RowDeselected
An event that is raised after a selected row is deselected.
Declaration
public EventCallback<RowDeselectEventArgs<TValue>> RowDeselected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDeselectEventArgs<TValue>> |
Remarks
This event handler receives a RowDeselectEventArgs<T> object which provides the details of deselected row.
Examples
<SfTreeGrid>
<TreeGridEvents RowDeselected="RowDeselectedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RowDeselectedHandler(RowDeselectEventArgs<BusinessObject> args)
{
}
}
RowDeselecting
An event that is raised when deselecting the selected row.
Declaration
public EventCallback<RowDeselectEventArgs<TValue>> RowDeselecting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDeselectEventArgs<TValue>> |
Remarks
This event handler receives a RowDeselectEventArgs<T> object which provides the details of the row to be deselected.
Examples
<SfTreeGrid>
<TreeGridEvents RowDeselecting="RowDeselectingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RowDeselectingHandler(RowDeselectEventArgs<BusinessObject> args)
{
}
}
RowDragStarting
Gets or sets the event callback that is raised when we start dragging the rows to perform reorder.
Declaration
public EventCallback<RowDragStartingEventArgs<TValue>> RowDragStarting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDragStartingEventArgs<TValue>> |
Remarks
This event handler receives a RowDragStartingEventArgs<T> object which provides the details of the rows from which it is dragged.
Examples
<SfTreeGrid DataSource="@Orders">
<TreeGridEvents TValue="Orders" RowDragStaringt="RowDragStartingHandler"></TreeGridEvents>
........
</SfTreeGrid>
@code{
public async Task RowDragStartingHandler(RowDragStartingEventArgs<Orders> args)
{
//you can get the dragged row data's here
List<Orders> Data = args.Data;
}
RowDropped
Gets or sets the event callback that is raised when row elements are dropped on the target element.
Declaration
public EventCallback<RowDroppedEventArgs<TValue>> RowDropped { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDroppedEventArgs<TValue>> |
Remarks
This event handler receives a RowDroppedEventArgs<T> object which provides the details of the rows which are dropped and the target where the rows are dropped.
Examples
<SfTreeGrid DataSource="@TreeData" @ref="TreeGrid">
<TreeGridEvents TValue="BusinessObject" RowDropped="RowDroppedHandler"></TreeGridEvents>
........
</SfTreeGrid>
@code{
public async Task RowDroppedHandler(RowDroppedEventArgs<BusinessObject> args)
{
//you can get the dropped row data's here
List<BusinessObject> Data = args.Data;
}
RowDropping
Gets or sets the event callback that is raised when the row elements are dropping on the target element. You can cancel the dropping action using this event.
Declaration
public EventCallback<RowDroppingEventArgs<TValue>> RowDropping { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowDroppingEventArgs<TValue>> |
Remarks
This event handler receives a RowDroppingEventArgs<T> object which provides the details of the rows which are dropping and the target where the rows are dropping.
If the dropping action is prevented using the Cancel
argument, then the RowDropped event doesn't trigger.
Examples
<SfTreeGrid DataSource="@TreeData" @ref="TreeGrid">
<TreeGridEvents TValue="BusinessObject" RowDropping="RowDroppingHandler"></TreeGridEvents>
........
</SfTreeGrid>
@code{
public async Task RowDroppingHandler(RowDroppingEventArgs<BusinessObject> args)
{
//you can cancel the dropping action here
args.Cancel = true;
}
RowSelected
An event that is raised after a tree grid row is selected.
Declaration
public EventCallback<RowSelectEventArgs<TValue>> RowSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowSelectEventArgs<TValue>> |
Remarks
This event handler receives a RowSelectEventArgs<T> object which provides the details of selected row.
Examples
<SfTreeGrid>
<TreeGridEvents RowSelected="RowSelectedHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RowSelectedHandler(RowSelectEventArgs<BusinessObject> args)
{
}
}
RowSelecting
An event that is raised before row selection occurs.
Declaration
public EventCallback<RowSelectingEventArgs<TValue>> RowSelecting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowSelectingEventArgs<TValue>> |
Remarks
This event handler receives a RowSelectingEventArgs<T> object which provides the details of the row to be selected. Row selection action can be cancelled using Cancel argument property.
Examples
<SfTreeGrid>
<TreeGridEvents RowSelecting="RowSelectingHandler" TValue="BusinessObject"></TreeGridEvents>
</SfTreeGrid>
@code {
public void RowSelectingHandler(RowSelectingEventArgs<BusinessObject> args)
{
}
}
Methods
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |