<EjsTreeGrid ………….>
……………………….
<TreeGridEvents OnActionComplete="Complete" TValue="TreeData.BusinessObject"></TreeGridEvents>
<TreeGridColumns>
…………………
</TreeGridColumns>
</EjsTreeGrid>
@code{
……………………….
private void Complete(ActionEventArgs<TreeData.BusinessObject> args)
{
if (args.RequestType.ToString() == "Add")
{
//Do your stuff here.
}
if (args.RequestType.ToString() == "BeginEdit")
{
// Do your stuff here.
}
if (args.RequestType.ToString() == "Save")
{
// Do your stuff here.
}
if (args.RequestType.ToString() == "Delete")
{
// Do your stuff here.
}
}
} |
<EjsTreeGrid DataSource="@TreeGridData" …………. >
…………….
<TreeGridColumns>
<TreeGridColumn Field="TaskId" HeaderText="Task ID" IsPrimaryKey="true" Width="80" TextAlign="Syncfusion.EJ2.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
…………………….
<TreeGridColumn HeaderText="Manage Records" Width="150" Commands="@commands"></TreeGridColumn>
</TreeGridColumns>
</EjsTreeGrid> |