Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfTreeGrid<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfTreeGrid<TValue>

    SfTreeGrid is a feature-rich Blazor component used to visualize self-referential or hierarchical data effectively in a tabular format.

    Inheritance
    System.Object
    Syncfusion.Blazor.SfBaseComponent
    SfDataBoundComponent
    SfTreeGrid<TValue>
    Inherited Members
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    Namespace: Syncfusion.Blazor.TreeGrid
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfTreeGrid<TValue> : SfDataBoundComponent, ITreeGrid, ISfCircularComponent
    Type Parameters
    Name Description
    TValue

    Constructors

    SfTreeGrid()

    Declaration
    public SfTreeGrid()

    Properties

    Aggregates

    Configures the TreeGrid aggregate rows.

    Declaration
    public List<TreeGridAggregate> Aggregates { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<TreeGridAggregate>

    AllowExcelExport

    If AllowExcelExport set to true, then it will allow the user to export treegrid to Excel file.

    Declaration
    public bool AllowExcelExport { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowFiltering

    If AllowFiltering is set to true the filter bar will be displayed. If set to false the filter bar will not be displayed. Filter bar allows the user to filter tree grid records with required criteria.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowMultiSorting

    If AllowMultiSorting set to true, then it will allow the user to sort multiple column in the treegrid.

    AllowSorting should be true.

    Declaration
    public bool AllowMultiSorting { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowPaging

    If AllowPaging is set to true, pager renders.

    Declaration
    public bool AllowPaging { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowPdfExport

    If AllowPdfExport set to true, then it will allow the user to export treegrid to Pdf file.

    Declaration
    public bool AllowPdfExport { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowReordering

    If AllowReordering is set to true, TreeGrid columns can be reordered. Reordering can be done by drag and drop of a particular column from one index to another index.

    If TreeGrid is rendered with stacked headers, reordering is allowed only at the same level as the column headers.

    Declaration
    public bool AllowReordering { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowResizing

    If AllowResizing is set to true, TreeGrid columns can be resized.

    Declaration
    public bool AllowResizing { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowRowDragAndDrop

    If AllowRowDragAndDrop is set to true, you can drag and drop treegrid rows at another or within treegrid.

    Declaration
    public bool AllowRowDragAndDrop { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    To drag and drop rows between treegrid or to another component, TargetID property should be provided with the ID of the target treegrid or any other component.

    AllowSelection

    If AllowSelection is set to true, it allows selection of (highlight row) TreeGrid records by clicking it.

    Declaration
    public bool AllowSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowSorting

    If AllowSorting is set to true, it allows sorting of treegrid records when column header is clicked.

    Declaration
    public bool AllowSorting { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowTextWrap

    If AllowTextWrap set to true, then text content will wrap to the next line when its text content exceeds the width of the Column Cells.

    Declaration
    public bool AllowTextWrap { get; set; }
    Property Value
    Type Description
    System.Boolean

    AutoCheckHierarchy

    If AutoCheckHierarchy is set to true, hierarchy checkbox selection is enabled in TreeGrid.

    Declaration
    public bool AutoCheckHierarchy { get; set; }
    Property Value
    Type Description
    System.Boolean

    ChildContent

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    ChildMapping

    Specifies the mapping property path for child records in data source

    Declaration
    public string ChildMapping { get; set; }
    Property Value
    Type Description
    System.String

    ClipMode

    Defines the mode of clip. The available modes are, Clip: Truncates the cell content when it overflows its area. Ellipsis: Displays ellipsis when the cell content overflows its area. EllipsisWithTooltip: Displays ellipsis when the cell content overflows its area, also it will display the tooltip while hover on ellipsis is applied..

    Declaration
    public ClipMode ClipMode { get; set; }
    Property Value
    Type Description
    ClipMode

    ColumnChooserSettings

    Configures the column chooser in the Tree Grid.

    Declaration
    public TreeGridColumnChooserSettings ColumnChooserSettings { get; set; }
    Property Value
    Type Description
    TreeGridColumnChooserSettings

    ColumnIndex

    Declaration
    public int ColumnIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    ColumnMenuItems

    ColumnMenuItems defines both built-in and custom column menu items.

    The available built-in items are, AutoFitAll - Auto fit the size of all columns. AutoFit - Auto fit the current column. SortAscending - Sort the current column in ascending order. SortDescending - Sort the current column in descending order. Filter - Filter options will show based on filterSettings property like filterbar, menu filter.

    Declaration
    public object ColumnMenuItems { get; set; }
    Property Value
    Type Description
    System.Object

    ColumnQueryMode

    ColumnQueryModeprovides options to retrieves data from the data source.Their types are All: It retrieves whole data source. Schema: retrieves data for all the defined columns in TreeGrid from the data source. ExcludeHidden: retrieves data only for visible columns of TreeGrid from the data Source.

    Declaration
    public ColumnQueryModeType ColumnQueryMode { get; set; }
    Property Value
    Type Description
    ColumnQueryModeType

    Columns

    Defines the schema of dataSource. If the Columns declaration is empty or undefined then the columns are automatically generated from data source.

    Declaration
    public List<TreeGridColumn> Columns { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<TreeGridColumn>

    ContextMenuItems

    ContextMenuItems defines both built-in and custom context menu items.

    The available built-in items are, AutoFitAll - Auto fit the size of all columns. AutoFit - Auto fit the current column. Edit - Edit the current record. Delete - Delete the current record. Save - Save the edited record. Cancel - Cancel the edited state. PdfExport - Export the grid as Pdf format. ExcelExport - Export the grid as Excel format. CsvExport - Export the grid as CSV format. SortAscending - Sort the current column in ascending order. SortDescending - Sort the current column in descending order. FirstPage - Go to the first page. PrevPage - Go to the previous page. LastPage - Go to the last page. NextPage - Go to the next page.

    Declaration
    public object ContextMenuItems { get; set; }
    Property Value
    Type Description
    System.Object

    CopyHierarchyMode

    CopyHierarchyMode Defines the copy clipboard types.

    The available built-in items are, Parent - Copy the selected data with parent record. Child - Copy the selected data with child record. Both - Copy the selected data with both parent and child record. None - Copy only the selected record.

    Declaration
    public CopyHierarchyType CopyHierarchyMode { get; set; }
    Property Value
    Type Description
    CopyHierarchyType

    DataSource

    It is used to render TreeGrid table rows.

    Declaration
    public IEnumerable<TValue> DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<TValue>

    DataSourceChanged

    Declaration
    public EventCallback<IEnumerable<TValue>> DataSourceChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Collections.Generic.IEnumerable<TValue>>

    DetailTemplate

    The detail template allows you to show or hide additional information about a particular row.

    Declaration
    public string DetailTemplate { get; set; }
    Property Value
    Type Description
    System.String

    EditSettings

    Configures the edit settings.

    Declaration
    public TreeGridEditSettings EditSettings { get; set; }
    Property Value
    Type Description
    TreeGridEditSettings

    EnableAltRow

    If EnableAltRow is set to true, the TreeGrid will render with e-altrow CSS class to the alternative tr elements.

    Declaration
    public bool EnableAltRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableAutoFill

    If EnableAutoFill is set to true, then the auto fill icon will displayed on cell selection for copy cells. It requires the selection mode to be Cell and cellSelectionMode to be Box.

    Declaration
    public bool EnableAutoFill { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableCollapseAll

    Specifies whether to load all the rows in collapsed state when the TreeGrid is rendered for the first time.

    Declaration
    public bool EnableCollapseAll { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableHover

    If EnableHover is set to true, the row hover is enabled in the TreeGrid.

    Declaration
    public bool EnableHover { 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 rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableVirtualization

    If EnableVirtualization set to true, then the Tree Grid will render only the rows visible within the view-port and load subsequent rows on vertical scrolling. This helps to load large dataset in Tree Grid.

    Declaration
    public bool EnableVirtualization { get; set; }
    Property Value
    Type Description
    System.Boolean

    ExpandStateMapping

    Specifies the mapping property path for the expand status of a record in data source.

    Declaration
    public string ExpandStateMapping { get; set; }
    Property Value
    Type Description
    System.String

    FilterSettings

    Configures the filter settings of the TreeGrid.

    Declaration
    public TreeGridFilterSettings FilterSettings { get; set; }
    Property Value
    Type Description
    TreeGridFilterSettings

    FrozenColumns

    Gets or sets the number of frozen columns.

    Declaration
    public double FrozenColumns { get; set; }
    Property Value
    Type Description
    System.Double

    FrozenRows

    Gets or sets the number of frozen rows.

    Declaration
    public double FrozenRows { get; set; }
    Property Value
    Type Description
    System.Double

    GridLines

    Defines the mode of TreeGrid lines. The available modes are, Both: Displays both horizontal and vertical TreeGrid lines. None: No TreeGrid lines are displayed. Horizontal: Displays the horizontal TreeGrid lines only. Vertical: Displays the vertical TreeGrid lines only. Default: Displays TreeGrid lines based on the theme.

    Declaration
    public GridLine GridLines { get; set; }
    Property Value
    Type Description
    GridLine

    HasChildMapping

    Specifies whether record is parent or not for the remote data binding

    Declaration
    public string HasChildMapping { get; set; }
    Property Value
    Type Description
    System.String

    Height

    Defines the scrollable height of the TreeGrid content.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    IdMapping

    Specifies the name of the field in the dataSource, which contains the id of that row.

    Declaration
    public string IdMapping { get; set; }
    Property Value
    Type Description
    System.String

    LoadChildOnDemand

    If LoadChildOnDemand is enabled, parent records are render in expanded state.

    Declaration
    public bool LoadChildOnDemand { get; set; }
    Property Value
    Type Description
    System.Boolean

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    PageSettings

    Configures the pager in the TreeGrid.

    Declaration
    public TreeGridPageSettings PageSettings { get; set; }
    Property Value
    Type Description
    TreeGridPageSettings

    ParentIdMapping

    Specifies the name of the field in the dataSource, which contains the parent’s id

    Declaration
    public string ParentIdMapping { get; set; }
    Property Value
    Type Description
    System.String

    PrintMode

    Defines the print modes. The available print modes are AllPages: Prints all pages of the TreeGrid. CurrentPage: Prints the current page of the TreeGrid.

    Declaration
    public PrintMode PrintMode { get; set; }
    Property Value
    Type Description
    PrintMode

    Query

    Defines the external Query that will be executed along with data processing.

    Declaration
    public Query Query { get; set; }
    Property Value
    Type Description
    Query
    Remarks

    Additional parameters can be send along with request by using AddParams(String, Object) method.

    RowDropSettings

    Configures the row drop settings of the TreeGrid.

    Declaration
    public TreeGridRowDropSettings RowDropSettings { get; set; }
    Property Value
    Type Description
    TreeGridRowDropSettings

    RowHeight

    Defines the height of TreeGrid rows.

    Declaration
    public double RowHeight { get; set; }
    Property Value
    Type Description
    System.Double

    RowTemplate

    The row template that renders customized rows from the given template. By default, TreeGrid renders a table row for every data source item.

    The row template must be a table row.

    Declaration
    public string RowTemplate { get; set; }
    Property Value
    Type Description
    System.String

    SearchSettings

    Configures the search settings of the TreeGrid.

    Declaration
    public TreeGridSearchSettings SearchSettings { get; set; }
    Property Value
    Type Description
    TreeGridSearchSettings

    SelectedRowIndex

    The SelectedRowIndex allows you to select a row at initial rendering. You can also get the currently selected row index.

    Declaration
    public double SelectedRowIndex { get; set; }
    Property Value
    Type Description
    System.Double

    SelectionSettings

    Configures the selection settings.

    Declaration
    public TreeGridSelectionSettings SelectionSettings { get; set; }
    Property Value
    Type Description
    TreeGridSelectionSettings

    ShowColumnChooser

    If ShowColumnChooser is set to true, it allows you to dynamically show or hide columns.

    Declaration
    public bool ShowColumnChooser { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowColumnMenu

    If ShowColumnMenu set to true, then it will enable the column menu options in each columns.

    Declaration
    public bool ShowColumnMenu { get; set; }
    Property Value
    Type Description
    System.Boolean

    SortSettings

    Configures the sort settings of the TreeGrid.

    Declaration
    public TreeGridSortSettings SortSettings { get; set; }
    Property Value
    Type Description
    TreeGridSortSettings

    TextWrapSettings

    Configures the text wrap in the TreeGrid.

    Declaration
    public TreeGridTextWrapSettings TextWrapSettings { get; set; }
    Property Value
    Type Description
    TreeGridTextWrapSettings

    Toolbar

    Toolbar defines the ToolBar items of the TreeGrid. It contains built-in and custom toolbar items. If a string value is assigned to the toolbar option, it is considered as the template for the whole TreeGrid ToolBar. If an array value is assigned, it is considered as the list of built-in and custom toolbar items in the TreeGrid's Toolbar.

    The following code example implements the custom toolbar items.

    Declaration
    public object Toolbar { get; set; }
    Property Value
    Type Description
    System.Object

    TreeColumnIndex

    Specifies the index of the column that needs to have the expander button.

    Declaration
    public double TreeColumnIndex { get; set; }
    Property Value
    Type Description
    System.Double

    Width

    Defines the TreeGrid width.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    AddRecord(TValue, Nullable<Double>, Nullable<RowPosition>)

    Adds a new record to the TreeGrid. Without passing parameters, it adds empty rows.

    TreeGridEditSettings.AllowAdding should be true.

    Declaration
    public Task AddRecord(TValue data, Nullable<double> index = null, Nullable<RowPosition> position = null)
    Parameters
    Type Name Description
    TValue data
    System.Nullable<System.Double> index
    System.Nullable<RowPosition> position
    Returns
    Type Description
    System.Threading.Tasks.Task

    AddRecord(Object, Nullable<Double>, Nullable<RowPosition>)

    Adds a new record to the TreeGrid. Without passing parameters, it adds empty rows.

    TreeGridEditSettings.AllowAdding should be true.

    Declaration
    public Task AddRecord(object data, Nullable<double> index = null, Nullable<RowPosition> position = null)
    Parameters
    Type Name Description
    System.Object data
    System.Nullable<System.Double> index
    System.Nullable<RowPosition> position
    Returns
    Type Description
    System.Threading.Tasks.Task

    AutoFitColumns(Object)

    Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.

    This method ignores the hidden columns. Uses the AutoFitColumns method in the dataBound event to resize at initial rendering.

    Declaration
    public Task AutoFitColumns(object fieldNames)
    Parameters
    Type Name Description
    System.Object fieldNames
    Returns
    Type Description
    System.Threading.Tasks.Task

    AutoFitColumns(String[])

    Declaration
    public Task AutoFitColumns(string[] fieldNames)
    Parameters
    Type Name Description
    System.String[] fieldNames
    Returns
    Type Description
    System.Threading.Tasks.Task

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    ClearFiltering()

    Clears all the filtered rows of the Grid.

    Declaration
    public Task ClearFiltering()
    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    ClearFiltering(List<String>)

    Clears all the filtered rows of the Grid.

    Declaration
    public Task ClearFiltering(List<string> fields)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> fields

    Specify the field name to be cleared

    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    ClearFiltering(Object)

    Clears all the filtered rows of the Grid.

    Declaration
    public Task ClearFiltering(object fields)
    Parameters
    Type Name Description
    System.Object fields

    Specify the field name to be cleared

    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    ClearSelection()

    Deselects the current selected rows and cells.

    Declaration
    public Task ClearSelection()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ClearSorting()

    Clears all the sorted columns of the TreeGrid.

    Declaration
    public Task ClearSorting()
    Returns
    Type Description
    System.Threading.Tasks.Task

    CloseEdit()

    Cancels edited state.

    Declaration
    public Task CloseEdit()
    Returns
    Type Description
    System.Threading.Tasks.Task

    CollapseAll()

    Collapses All the rows

    Declaration
    public Task CollapseAll()
    Returns
    Type Description
    System.Threading.Tasks.Task

    CollapseAtLevel(Double)

    Collapses the records at specific hierarchical level

    Declaration
    public Task CollapseAtLevel(double level)
    Parameters
    Type Name Description
    System.Double level
    Returns
    Type Description
    System.Threading.Tasks.Task

    CollapseRow(TValue)

    Collapses child rows

    Declaration
    public Task CollapseRow(TValue record)
    Parameters
    Type Name Description
    TValue record
    Returns
    Type Description
    System.Threading.Tasks.Task

    CollapseRow(Object)

    Collapses child rows

    Declaration
    public Task CollapseRow(object record)
    Parameters
    Type Name Description
    System.Object record
    Returns
    Type Description
    System.Threading.Tasks.Task

    Copy(Nullable<Boolean>)

    Copy the selected rows or cells data into clipboard.

    Declaration
    public Task Copy(Nullable<bool> withHeader = null)
    Parameters
    Type Name Description
    System.Nullable<System.Boolean> withHeader
    Returns
    Type Description
    System.Threading.Tasks.Task

    CsvExport(ExcelExportProperties, Nullable<Boolean>, Object, Nullable<Boolean>)

    Export TreeGrid data to CSV file.

    Declaration
    public Task CsvExport(ExcelExportProperties excelExportProperties = null, Nullable<bool> isMultipleExport = null, object workbook = null, Nullable<bool> isBlob = null)
    Parameters
    Type Name Description
    ExcelExportProperties excelExportProperties
    System.Nullable<System.Boolean> isMultipleExport
    System.Object workbook
    System.Nullable<System.Boolean> isBlob
    Returns
    Type Description
    System.Threading.Tasks.Task

    DeleteRecord()

    Delete a record with Given options. If fieldname and data is not given then grid will delete the selected record. TreeGridEditSettings.AllowDeleting should be true.

    Declaration
    public Task DeleteRecord()
    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    DeleteRecord(String, TValue)

    Declaration
    public Task DeleteRecord(string fieldName, TValue data)
    Parameters
    Type Name Description
    System.String fieldName
    TValue data
    Returns
    Type Description
    System.Threading.Tasks.Task

    DeleteRecord(String, Object)

    Delete a record with Given options. If fieldName and data is not given then TreeGrid will delete the selected record.

    TreeGridEditSettings.AllowDeleting should be true.

    Declaration
    public Task DeleteRecord(string fieldName = null, object data = null)
    Parameters
    Type Name Description
    System.String fieldName
    System.Object data
    Returns
    Type Description
    System.Threading.Tasks.Task

    DeleteRow(Object)

    Delete any visible row by TR element.

    Declaration
    public Task DeleteRow(object tr)
    Parameters
    Type Name Description
    System.Object tr
    Returns
    Type Description
    System.Threading.Tasks.Task

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    Syncfusion.Blazor.SfBaseComponent.Dispose()

    EditCell(Double, String)

    To edit any particular cell using row index and cell index.

    Declaration
    public Task EditCell(double rowIndex, string field)
    Parameters
    Type Name Description
    System.Double rowIndex
    System.String field
    Returns
    Type Description
    System.Threading.Tasks.Task

    EnableToolbarItems(List<String>, Boolean)

    Enables or disables ToolBar items.

    Declaration
    public Task EnableToolbarItems(List<string> items, bool isEnable)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> items
    System.Boolean isEnable
    Returns
    Type Description
    System.Threading.Tasks.Task

    EndEdit()

    If TreeGrid is in editable state, you can save a record by invoking endEdit.

    Declaration
    public Task EndEdit()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExcelExport(ExcelExportProperties, Nullable<Boolean>, Object, Nullable<Boolean>)

    Export TreeGrid data to Excel file(.xlsx).

    Declaration
    public Task ExcelExport(ExcelExportProperties excelExportProperties = null, Nullable<bool> isMultipleExport = null, object workbook = null, Nullable<bool> isBlob = null)
    Parameters
    Type Name Description
    ExcelExportProperties excelExportProperties
    System.Nullable<System.Boolean> isMultipleExport
    System.Object workbook
    System.Nullable<System.Boolean> isBlob
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExpandAll()

    Expands All the rows

    Declaration
    public Task ExpandAll()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExpandAtLevel(Double)

    Expands the records at specific hierarchical level

    Declaration
    public Task ExpandAtLevel(double level)
    Parameters
    Type Name Description
    System.Double level
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExpandRow(TValue)

    Expands child rows

    Declaration
    public Task ExpandRow(TValue record)
    Parameters
    Type Name Description
    TValue record
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExpandRow(Object)

    Expands child rows

    Declaration
    public Task ExpandRow(object record)
    Parameters
    Type Name Description
    System.Object record
    Returns
    Type Description
    System.Threading.Tasks.Task

    FilterByColumn(String, String, Object, String, Nullable<Boolean>, Nullable<Boolean>, String, String)

    Filters TreeGrid row by column name with the given options.

    Declaration
    public Task FilterByColumn(string fieldName, string filterOperator, object filterValue, string predicate = null, Nullable<bool> matchCase = null, Nullable<bool> ignoreAccent = null, string actualFilterValue = null, string actualOperator = null)
    Parameters
    Type Name Description
    System.String fieldName
    System.String filterOperator
    System.Object filterValue
    System.String predicate
    System.Nullable<System.Boolean> matchCase
    System.Nullable<System.Boolean> ignoreAccent
    System.String actualFilterValue
    System.String actualOperator
    Returns
    Type Description
    System.Threading.Tasks.Task

    GetBatchChanges()

    Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.

    Declaration
    public Task<BatchChanges<TValue>> GetBatchChanges()
    Returns
    Type Description
    System.Threading.Tasks.Task<BatchChanges<TValue>>

    GetCellFromIndex(Double, Double)

    Gets a cell by row and column index.

    Declaration
    public Task<DOM> GetCellFromIndex(double rowIndex, double columnIndex)
    Parameters
    Type Name Description
    System.Double rowIndex
    System.Double columnIndex
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetCheckedRecords()

    Get the records of checked rows.

    Declaration
    public Task<List<TValue>> GetCheckedRecords()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>>

    GetCheckedRowIndexes()

    Get the indexes of checked rows.

    Declaration
    public Task<List<double>> GetCheckedRowIndexes()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.Double>>

    GetColumnByField(String)

    Gets a Column by column name.

    Declaration
    public Task<TreeGridColumn> GetColumnByField(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Threading.Tasks.Task<TreeGridColumn>

    GetColumnByUid(String)

    Gets a column by UID.

    Declaration
    public Task<TreeGridColumn> GetColumnByUid(string uid)
    Parameters
    Type Name Description
    System.String uid
    Returns
    Type Description
    System.Threading.Tasks.Task<TreeGridColumn>

    GetColumnFieldNames()

    Gets the collection of column fields.

    Declaration
    public Task<List<string>> GetColumnFieldNames()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>>

    GetColumnHeaderByField(String)

    Gets a column header by column name.

    Declaration
    public Task<DOM> GetColumnHeaderByField(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetColumnHeaderByIndex(Double)

    Gets a column header by column index.

    Declaration
    public Task<DOM> GetColumnHeaderByIndex(double index)
    Parameters
    Type Name Description
    System.Double index
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetColumnHeaderByUid(String)

    Gets a column header by UID.

    Declaration
    public Task<DOM> GetColumnHeaderByUid(string uid)
    Parameters
    Type Name Description
    System.String uid
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetColumnIndexByField(String)

    Gets a column index by column name.

    Declaration
    public Task<double> GetColumnIndexByField(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Double>

    GetColumnIndexByUid(String)

    Gets a column index by UID.

    Declaration
    public Task<double> GetColumnIndexByUid(string uid)
    Parameters
    Type Name Description
    System.String uid
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Double>

    GetColumns()

    Gets the columns from the TreeGrid.

    Declaration
    public Task<List<TreeGridColumn>> GetColumns()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<TreeGridColumn>>

    GetContent()

    Gets the content div of the TreeGrid.

    Declaration
    public Task<DOM> GetContent()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetContentTable()

    Gets the content table of the TreeGrid.

    Declaration
    public Task<DOM> GetContentTable()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetCurrentViewRecords()

    Get current visible data of TreeGrid.

    Declaration
    public List<TValue> GetCurrentViewRecords()
    Returns
    Type Description
    System.Collections.Generic.List<TValue>

    GetDataModule()

    Gets the data module.

    Declaration
    public Task<object> GetDataModule()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Object>

    GetDataRows()

    Gets all the TreeGrid's data rows.

    Declaration
    public Task<List<DOM>> GetDataRows()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<DOM>>

    GetFooterContent()

    Gets the footer div of the TreeGrid.

    Declaration
    public Task<DOM> GetFooterContent()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetFooterContentTable()

    Gets the footer table element of the TreeGrid.

    Declaration
    public Task<DOM> GetFooterContentTable()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetHeaderContent()

    Gets the header div of the TreeGrid.

    Declaration
    public Task<DOM> GetHeaderContent()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetHeaderTable()

    Gets the header table element of the TreeGrid.

    Declaration
    public Task<DOM> GetHeaderTable()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetMovableCellFromIndex(Double, Double)

    Gets a movable table cell by row and column index.

    Declaration
    public Task<DOM> GetMovableCellFromIndex(double rowIndex, double columnIndex)
    Parameters
    Type Name Description
    System.Double rowIndex
    System.Double columnIndex
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetMovableDataRows()

    Gets all the TreeGrid's movable table data rows.

    Declaration
    public Task<List<DOM>> GetMovableDataRows()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<DOM>>

    GetMovableRowByIndex(Double)

    Gets a movable tables row by index.

    Declaration
    public Task<DOM> GetMovableRowByIndex(double index)
    Parameters
    Type Name Description
    System.Double index
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetMovableRows()

    Gets the TreeGrid's movable content rows from frozen treegrid.

    Declaration
    public Task<List<DOM>> GetMovableRows()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<DOM>>

    GetPager()

    Gets the pager of the TreeGrid.

    Declaration
    public Task<DOM> GetPager()
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetPrimaryKeyFieldNames()

    Get the names of the primary key columns of the TreeGrid.

    Declaration
    public Task<List<string>> GetPrimaryKeyFieldNames()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>>

    GetRowByIndex(Double)

    Gets a row by index.

    Declaration
    public Task<DOM> GetRowByIndex(double index)
    Parameters
    Type Name Description
    System.Double index
    Returns
    Type Description
    System.Threading.Tasks.Task<DOM>

    GetRowInfo(Object)

    Get a row information based on cell

    Declaration
    public Task<object> GetRowInfo(object target)
    Parameters
    Type Name Description
    System.Object target
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Object>

    GetRows()

    Returns TreeGrid rows

    Declaration
    public Task<List<DOM>> GetRows()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<DOM>>

    GetSelectedRecords()

    Gets the collection of selected records.

    Declaration
    public Task<List<TValue>> GetSelectedRecords()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>>

    GetSelectedRowCellIndexes()

    Gets the collection of selected row and cell indexes.

    Declaration
    public Task<List<ValueTuple<double, double>>> GetSelectedRowCellIndexes()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.ValueTuple<System.Double, System.Double>>>

    GetSelectedRowIndexes()

    Gets the collection of selected row indexes.

    Declaration
    public Task<List<double>> GetSelectedRowIndexes()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<System.Double>>

    GetSelectedRows()

    Gets the collection of selected rows.

    Declaration
    public Task<List<DOM>> GetSelectedRows()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<DOM>>

    GetUidByColumnField(String)

    Gets UID by column name.

    Declaration
    public Task<string> GetUidByColumnField(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    GetVisibleColumns()

    Gets the visible columns from the TreeGrid.

    Declaration
    public Task<List<TreeGridColumn>> GetVisibleColumns()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<TreeGridColumn>>

    GoToPage(Double)

    Navigates to the specified target page.

    Declaration
    public Task GoToPage(double pageNo)
    Parameters
    Type Name Description
    System.Double pageNo
    Returns
    Type Description
    System.Threading.Tasks.Task

    HideColumns(Object, String)

    Hides a column by column name.

    Declaration
    public Task HideColumns(object keys, string hideBy = null)
    Parameters
    Type Name Description
    System.Object keys
    System.String hideBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    HideColumns(String, String)

    Declaration
    public Task HideColumns(string Key, string HideBy = "HeaderText")
    Parameters
    Type Name Description
    System.String Key
    System.String HideBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    HideColumns(String[], String)

    Declaration
    public Task HideColumns(string[] Keys, string HideBy = "HeaderText")
    Parameters
    Type Name Description
    System.String[] Keys
    System.String HideBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    HideSpinner()

    Manually shown spinner needs to hide by HideSpinnner.

    Declaration
    public Task HideSpinner()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Initialized()

    Declaration
    protected Task Initialized()
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    OpenColumnChooser(Nullable<Double>, Nullable<Double>)

    Column chooser can be displayed on screen by given position(X and Y axis).

    Declaration
    public Task OpenColumnChooser(Nullable<double> x = null, Nullable<double> y = null)
    Parameters
    Type Name Description
    System.Nullable<System.Double> x
    System.Nullable<System.Double> y
    Returns
    Type Description
    System.Threading.Tasks.Task

    ParametersSet()

    Declaration
    protected Task ParametersSet()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Paste(String, Double, Double)

    Paste data from clipboard to selected cells.

    Declaration
    public Task Paste(string data, double rowIndex, double colIndex)
    Parameters
    Type Name Description
    System.String data
    System.Double rowIndex
    System.Double colIndex
    Returns
    Type Description
    System.Threading.Tasks.Task

    PdfExport(PdfExportProperties, Nullable<Boolean>, Object, Nullable<Boolean>)

    Export TreeGrid data to PDF document.

    Declaration
    public Task PdfExport(PdfExportProperties pdfExportProperties = null, Nullable<bool> isMultipleExport = null, object pdfDoc = null, Nullable<bool> isBlob = null)
    Parameters
    Type Name Description
    PdfExportProperties pdfExportProperties
    System.Nullable<System.Boolean> isMultipleExport
    System.Object pdfDoc
    System.Nullable<System.Boolean> isBlob
    Returns
    Type Description
    System.Threading.Tasks.Task

    PreventRender(Boolean)

    Prevents the Tree Grid render. This method will internally sets value to be returned from ShouldRender method.

    Declaration
    public void PreventRender(bool preventRender = true)
    Parameters
    Type Name Description
    System.Boolean preventRender

    Default value is true. Toggles the ShouldRender method value.

    Print()

    By default, prints all the pages of the TreeGrid and hides the pager. You can customize print options using the PrintMode.

    Declaration
    public Task Print()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Refresh()

    Refreshes the tree grid header and content.

    Declaration
    public void Refresh()

    RefreshColumns()

    Refreshes the TreeGrid column changes.

    Declaration
    public Task RefreshColumns()
    Returns
    Type Description
    System.Threading.Tasks.Task

    RefreshHeader()

    Refreshes the TreeGrid header.

    Declaration
    public Task RefreshHeader()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ReorderColumns(List<String>, String)

    Declaration
    public Task ReorderColumns(List<string> fromFName, string toFName)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> fromFName
    System.String toFName
    Returns
    Type Description
    System.Threading.Tasks.Task

    ReorderColumns(Object, String)

    Changes the TreeGrid column positions by field names.

    Declaration
    public Task ReorderColumns(object fromFName, string toFName)
    Parameters
    Type Name Description
    System.Object fromFName
    System.String toFName
    Returns
    Type Description
    System.Threading.Tasks.Task

    ReorderRows(Double, Double, String)

    Changes the Tree Grid Row position with given indexes.

    Declaration
    public Task ReorderRows(double fromIndex, double toIndex, string position = null)
    Parameters
    Type Name Description
    System.Double fromIndex

    Specifies the start row index

    System.Double toIndex

    Specifies the to row index

    System.String position
    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    ReorderRows(Object, Double, String)

    Reorder the rows based on given indexes and position

    Declaration
    public Task ReorderRows(object fromIndex, double toIndex, string position = null)
    Parameters
    Type Name Description
    System.Object fromIndex
    System.Double toIndex
    System.String position
    Returns
    Type Description
    System.Threading.Tasks.Task

    SaveCell()

    Saves the cell that is currently edited. It does not save the value to the DataSource.

    Declaration
    public Task SaveCell()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Search(String)

    Searches TreeGrid records using the given key.

    Declaration
    public Task Search(string searchString)
    Parameters
    Type Name Description
    System.String searchString
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectCell(Object, Nullable<Boolean>)

    Selects a cell by the given index.

    Declaration
    public Task SelectCell(object cellIndex, Nullable<bool> isToggle = null)
    Parameters
    Type Name Description
    System.Object cellIndex
    System.Nullable<System.Boolean> isToggle
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectCell(ValueTuple<Int32, Int32>, Nullable<Boolean>)

    Selects a cell by the given index.

    Declaration
    public Task SelectCell(ValueTuple<int, int> cellIndex, Nullable<bool> isToggle = null)
    Parameters
    Type Name Description
    System.ValueTuple<System.Int32, System.Int32> cellIndex
    System.Nullable<System.Boolean> isToggle
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectCheckboxes(Object)

    Checked the checkboxes using rowIndexes.

    Declaration
    public Task SelectCheckboxes(object indexes)
    Parameters
    Type Name Description
    System.Object indexes
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectRow(Double, Nullable<Boolean>)

    Selects a row by given index.

    Declaration
    public Task SelectRow(double index, Nullable<bool> isToggle = null)
    Parameters
    Type Name Description
    System.Double index
    System.Nullable<System.Boolean> isToggle
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectRows(Double[])

    Selects a collection of rows by indexes.

    Declaration
    public Task SelectRows(double[] rowIndexes)
    Parameters
    Type Name Description
    System.Double[] rowIndexes

    Specifies the indexes of rows to be selected

    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task

    SelectRows(Object)

    Selects a collection of rows by indexes.

    Declaration
    public Task SelectRows(object rowIndexes)
    Parameters
    Type Name Description
    System.Object rowIndexes
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetCellValue(Object, String, Object)

    Updates particular cell value based on the given primary key value.

    Primary key column must be specified using Columns.isPrimaryKey property.

    Declaration
    public Task SetCellValue(object key, string field, object value)
    Parameters
    Type Name Description
    System.Object key
    System.String field
    System.Object value
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetRowData(Object, TValue)

    Updates and refresh the particular row values based on the given primary key value.

    Primary key column must be specified using Columns.isPrimaryKey property.

    Specifies the PrimaryKey value of dataSource. To update new data for the particular row.
    Declaration
    public Task SetRowData(object primaryKey, TValue rowData)
    Parameters
    Type Name Description
    System.Object primaryKey
    TValue rowData
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetRowData(Object, Object)

    Updates and refresh the particular row values based on the given primary key value.

    Primary key column must be specified using Columns.isPrimaryKey property.

    Specifies the PrimaryKey value of dataSource. To update new data for the particular row.
    Declaration
    public Task SetRowData(object primaryKey, object rowData)
    Parameters
    Type Name Description
    System.Object primaryKey
    System.Object rowData
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShouldRender()

    Declaration
    protected override bool ShouldRender()
    Returns
    Type Description
    System.Boolean

    ShowColumns(Object, String)

    Shows a column by its column name.

    Declaration
    public Task ShowColumns(object keys, string showBy = null)
    Parameters
    Type Name Description
    System.Object keys
    System.String showBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowColumns(String, String)

    Declaration
    public Task ShowColumns(string Key, string ShowBy = "HeaderText")
    Parameters
    Type Name Description
    System.String Key
    System.String ShowBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowColumns(String[], String)

    Declaration
    public Task ShowColumns(string[] Keys, string ShowBy = "HeaderText")
    Parameters
    Type Name Description
    System.String[] Keys
    System.String ShowBy
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowSpinner()

    By default, TreeGrid shows the spinner for all its actions. You can use this method to show spinner at your needed time.

    Declaration
    public Task ShowSpinner()
    Returns
    Type Description
    System.Threading.Tasks.Task

    SortByColumn(String, SortDirection, Nullable<Boolean>)

    Sorts a column with the given options.

    Declaration
    public Task SortByColumn(string columnName, SortDirection direction, Nullable<bool> isMultiSort = null)
    Parameters
    Type Name Description
    System.String columnName
    SortDirection direction
    System.Nullable<System.Boolean> isMultiSort
    Returns
    Type Description
    System.Threading.Tasks.Task

    StartEdit()

    To edit any particular row by TR element.

    Declaration
    public Task StartEdit()
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateCell(Double, String, Object)

    To update the specified cell by given value without changing into edited state.

    Declaration
    public Task UpdateCell(double rowIndex, string field, object value)
    Parameters
    Type Name Description
    System.Double rowIndex
    System.String field
    System.Object value
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateExternalMessage(String)

    Defines the text of external message.

    Declaration
    public Task UpdateExternalMessage(string message)
    Parameters
    Type Name Description
    System.String message
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateRow(Double, TValue)

    To update the specified row by given values without changing into edited state.

    Declaration
    public Task UpdateRow(double index, TValue data)
    Parameters
    Type Name Description
    System.Double index
    TValue data
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateRow(Double, Object)

    To update the specified row by given values without changing into edited state.

    Declaration
    public Task UpdateRow(double index, object data)
    Parameters
    Type Name Description
    System.Double index
    System.Object data
    Returns
    Type Description
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved