Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c63fdce
1032923: databinding changed
dhanushaSF4765 Jun 12, 2026
1dd448b
1032923: paging sample updated
dhanushaSF4765 Jun 12, 2026
ec39499
1032923: scrolling updated
dhanushaSF4765 Jun 12, 2026
d48d1cc
1032923: sample updated
dhanushaSF4765 Jun 12, 2026
e5618bd
1032923: Modified samples
Sanjai-SF5070 Jun 12, 2026
a26b0d0
Merge branch '1032923-TreeGridDoc' of https://github.com/syncfusion-c…
Sanjai-SF5070 Jun 12, 2026
56deb4a
1032923: columns updated
dhanushaSF4765 Jun 12, 2026
db1b2fd
1032923: Committed changes
Sanjai-SF5070 Jun 12, 2026
2c247da
Merge branch '1032923-TreeGridDoc' of https://github.com/syncfusion-c…
dhanushaSF4765 Jun 12, 2026
dea3154
Merge branch '1032923-TreeGridDoc' of https://github.com/syncfusion-c…
dhanushaSF4765 Jun 12, 2026
9d103c7
1032923: committed changes
Sanjai-SF5070 Jun 12, 2026
93ae4be
Merge branch '1032923-TreeGridDoc' of https://github.com/syncfusion-c…
Sanjai-SF5070 Jun 12, 2026
70d4389
1032923: paging updated
dhanushaSF4765 Jun 12, 2026
9729161
Merge branch '1032923-TreeGridDoc' of https://github.com/syncfusion-c…
dhanushaSF4765 Jun 12, 2026
0fa4bd9
1032923: updated
dhanushaSF4765 Jun 12, 2026
d3afb7d
1032923: added colon
dhanushaSF4765 Jun 12, 2026
1d4bba1
1032923: updated
dhanushaSF4765 Jun 12, 2026
aa96c09
1032923: filter updated
dhanushaSF4765 Jun 12, 2026
f6f3d39
1032923: filter updated
dhanushaSF4765 Jun 12, 2026
a2f5534
1032923: context menu updated
dhanushaSF4765 Jun 12, 2026
3a72140
1032923: column-chooser updated
dhanushaSF4765 Jun 12, 2026
ef84dd6
1032923: cell updated
dhanushaSF4765 Jun 12, 2026
d31d0e8
1032923: column-reorder updated
dhanushaSF4765 Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions blazor/treegrid/aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ namespace TreeGridComponent.Data {

public class TreeData
{
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime? StartDate { get; set; }
public int? Duration { get; set; }
public int? Progress { get; set; }
public bool Approved { get; set; }
public int? ParentId { get; set; }
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime? StartDate { get; set; }
public int? Duration { get; set; }
public int? Progress { get; set; }
public bool Approved { get; set; }
public int? ParentId { get; set; }

public static List<TreeData> GetSelfDataSource()
{
List<TreeData> TreeDataCollection = new List<TreeData>();
TreeDataCollection.Add(new TreeData() { TaskId = 1, TaskName = "Parent Task 1", Duration = 10, Progress = 70, Approved = true, ParentId = null });
TreeDataCollection.Add(new TreeData() { TaskId = 2, TaskName = "Child task 1", Duration = 4, Progress = 80, Approved = false, Duration = 50, ParentId = 1 });
TreeDataCollection.Add(new TreeData() { TaskId = 2, TaskName = "Child task 1", Duration = 4, Progress = 80, Approved = false, ParentId = 1 });
TreeDataCollection.Add(new TreeData() { TaskId = 3, TaskName = "Child Task 2", Duration = 5, Progress = 65, Approved = true, ParentId = 2 });
TreeDataCollection.Add(new TreeData() { TaskId = 4, TaskName = "Child task 3", Duration = 6, Approved = false, Progress = 77, ParentId = 3 });
TreeDataCollection.Add(new TreeData() { TaskId = 5, TaskName = "Parent Task 2", Duration = 10, Progress = 70, Approved = true, ParentId = null });
Expand Down Expand Up @@ -172,8 +172,6 @@ The aggregate value result can be formatted by using the [Format](https://help.s
@code{
public List<TreeData> TreeGridData { get; set; }

public Syncfusion.Blazor.Grids.AggregateTemplateContext model = new Syncfusion.Blazor.Grids.AggregateTemplateContext();

protected override void OnInitialized()
{
this.TreeGridData = TreeData.GetSelfDataSource().ToList();
Expand All @@ -188,19 +186,19 @@ namespace TreeGridComponent.Data {

public class TreeData
{
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime? StartDate { get; set; }
public int? Duration { get; set; }
public int? Progress { get; set; }
public bool Approved { get; set; }
public int? ParentId { get; set; }
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime? StartDate { get; set; }
public int? Duration { get; set; }
public int? Progress { get; set; }
public bool Approved { get; set; }
public int? ParentId { get; set; }

public static List<TreeData> GetSelfDataSource()
{
List<TreeData> TreeDataCollection = new List<TreeData>();
TreeDataCollection.Add(new TreeData() { TaskId = 1, TaskName = "Parent Task 1", Duration = 10, Progress = 70, Approved = true, ParentId = null });
TreeDataCollection.Add(new TreeData() { TaskId = 2, TaskName = "Child task 1",Duration = 4, Progress = 80, Approved = false, Duration = 50, ParentId = 1 });
TreeDataCollection.Add(new TreeData() { TaskId = 2, TaskName = "Child task 1",Duration = 4, Progress = 80, Approved = false, ParentId = 1 });
TreeDataCollection.Add(new TreeData() { TaskId = 3, TaskName = "Child Task 2", Duration = 5, Progress = 65, Approved = true, ParentId = 2 });
TreeDataCollection.Add(new TreeData() { TaskId = 4, TaskName = "Child task 3", Duration = 6, Approved = false, Progress = 77, ParentId = 3 });
TreeDataCollection.Add(new TreeData() { TaskId = 5, TaskName = "Parent Task 2", Duration = 10, Progress = 70, Approved = true, ParentId = null });
Expand Down
5 changes: 3 additions & 2 deletions blazor/treegrid/cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ The appearance of cells can be customized by using the [QueryCellInfo](https://h

@using TreeGridComponent.Data;
@using Syncfusion.Blazor.TreeGrid;
@using Syncfusion.Blazor.Grids;

<SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId" TreeColumnIndex="1">
<TreeGridEvents QueryCellInfo="querycellinfo" TValue="TreeData"></TreeGridEvents>
Expand Down Expand Up @@ -121,12 +122,12 @@ The appearance of cells can be customized by using the [QueryCellInfo](https://h
{
String[] s1 = new String[1] { "intro" };
Args.Cell.AddClass(s1);
}
}
else if (Args.Column.Field == "Progress" && Args.Data.Progress > 20)
{
String[] s2 = new String[1] { "intro1" };
Args.Cell.AddClass(s2);
}
}
}
}

Expand Down
31 changes: 16 additions & 15 deletions blazor/treegrid/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Interaction keys |Description
@using TreeGridComponent.Data;
@using Syncfusion.Blazor.TreeGrid;

<SfTreeGrids DataSource="@TreeData" IdMapping="TaskID"
ParentIdMapping="ParentID" TreeColumnIndex="1">
<SfTreeGrid DataSource="@TreeData" IdMapping="TaskId"
ParentIdMapping="ParentId" TreeColumnIndex="1">
<TreeGridColumns>
<TreeGridColumn Field="TaskID" HeaderText="Task ID" Width="60" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskId" HeaderText="Task ID" Width="60" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="80">
</TreeGridColumn>
<TreeGridColumn Field="StartDate" HeaderText="Start Date" Format="d" Type=ColumnType.Date Width="90" TextAlign="TextAlign.Right">
Expand All @@ -37,14 +37,14 @@ ParentIdMapping="ParentID" TreeColumnIndex="1">
<TreeGridColumn Field="Progress" HeaderText="Progress" Width="80">
</TreeGridColumn>
</TreeGridColumns>
</SfTreeGrids>
</SfTreeGrid>

@code {

public List<BusinessObject> TreeData { get; set; }
protected override void OnInitialized()
{
this.TreeGridData = BusinessObject.GetSelfDataSource().ToList();
this.TreeData = BusinessObject.GetSelfDataSource().ToList();
}
}

Expand Down Expand Up @@ -101,7 +101,7 @@ To copy the data of the selected rows or cells into the clipboard with help of e

<SfButton OnClick="CopyHeader">Copy With Header</SfButton>

<SfTreeGrid @ref="TreeGrid" DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId" TreeColumnIndex="1" AllowTextWrap="true">
<SfTreeGrid @ref="TreeGrid" DataSource="@TreeData" IdMapping="TaskId" ParentIdMapping="ParentId" TreeColumnIndex="1" AllowTextWrap="true">
<TreeGridColumns>
<TreeGridColumn Field="TaskId" HeaderText="Task ID" Width="80" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="100"></TreeGridColumn>
Expand All @@ -118,15 +118,15 @@ To copy the data of the selected rows or cells into the clipboard with help of e
public List<BusinessObject> TreeData { get; set; }
protected override void OnInitialized()
{
this.TreeGridData = BusinessObject.GetSelfDataSource().ToList();
this.TreeData = BusinessObject.GetSelfDataSource().ToList();
}

public async void Copy()
public async Task Copy()
{
await this.TreeGrid.CopyAsync();
}

public async void CopyHeader()
public async Task CopyHeader()
{
await this.TreeGrid.CopyAsync(true);
}
Expand Down Expand Up @@ -206,25 +206,26 @@ Tree Grid provides support for a set of copy modes with [CopyHierarchyMode](http
@using TreeGridComponent.Data;
@using Syncfusion.Blazor.TreeGrid;
@using Syncfusion.Blazor.DropDowns;
@using Syncfusion.Blazor.Grids

<SfDropDownList TValue="string" TItem="DropdownData" @bind-Value="@CopyMode" DataSource="@CopyModes">
<SfDropDownList TItem="DropdownData" TValue="string" TItem="DropdownData" @bind-Value="@CopyMode" DataSource="@CopyModes">
<DropDownListEvents TValue="string" ValueChange="OnTypeChange"></DropDownListEvents>
<DropDownListFieldSettings Text="Mode" Value="Id"></DropDownListFieldSettings>
</SfDropDownList>

<SfTreeGrids @ref="TreeGrid" CopyHierarchyMode="@CopyType" DataSource="@TreeData" IdMapping="TaskID" ParentIdMapping="ParentID" TreeColumnIndex="1">
<SfTreeGrid @ref="TreeGrid" CopyHierarchyMode="@CopyType" DataSource="@TreeData" IdMapping="TaskId" ParentIdMapping="ParentId" TreeColumnIndex="1">
<TreeGridColumns>
<TreeGridColumn Field="TaskID" HeaderText="Task ID" Width="60" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskId" HeaderText="Task ID" Width="60" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="80"></TreeGridColumn>
<TreeGridColumn Field="StartDate" HeaderText="Start Date" Format="d" Type=ColumnType.Date Width="90" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="Duration" HeaderText="Duration" Width="80" TextAlign="TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="Progress" HeaderText="Progress" Width="80"></TreeGridColumn>
</TreeGridColumns>
</SfTreeGrids>
</SfTreeGrid>

@code {

SfTreeGrids<BusinessObject> TreeGrid;
SfTreeGrid<BusinessObject> TreeGrid;

public string CopyMode { get; set; } = "Parent";

Expand All @@ -251,7 +252,7 @@ Tree Grid provides support for a set of copy modes with [CopyHierarchyMode](http
this.CopyModes.Add(new DropdownData() { Id = "None", Mode = "None" });
}

private async void OnTypeChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string> Args)
private async Task OnTypeChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, DropdownData> Args)
{
if (Args.Value == "Parent")
{
Expand Down
20 changes: 11 additions & 9 deletions blazor/treegrid/columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Customize the header element using the [HeaderTemplate](https://help.syncfusion.
</HeaderTemplate>
</TreeGridColumn>
<TreeGridColumn Field="Designation" HeaderText="Designation" Width="120"></TreeGridColumn>
<TreeGridColumn Field="EmpID" HeaderText="Progress" Width="80" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="EmpID" HeaderText="Employee Name" Width="80" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="Country" HeaderText="Priority" Width="100"></TreeGridColumn>
</TreeGridColumns>
</SfTreeGrid>
Expand Down Expand Up @@ -203,9 +203,10 @@ Customize the header element using the [HeaderTemplate](https://help.syncfusion.

{% highlight c# %}

namespace TreeGridComponent.Data {
namespace TreeGridComponent.Data
{

public class Employee
public class Employee
{
public string Name { get; set; }
public string? FullName { get; set; }
Expand All @@ -215,16 +216,17 @@ public class Employee
public string? Country { get; set; }
public int? ParentId { get; set; }
public Employee Treedata { get; set; }
public int EmployeeID { get; set; }

public static List<Employee> GetTemplateData()
{
List<Employee> DataCollection = new List<Employee>();
DataCollection.Add(new Employee { Name = "Robert King",Designation = "Chief Executive Officer",EmpID = "EMP001",Country = "USA",ParentId = null,Treedata = new TreeData() { ID = 21}});
DataCollection.Add(new Employee { Name = "David william",Designation = "Vice President",EmpID = "EMP004",Country = "USA",ParentId = 1,Treedata = new TreeData() { ID = 21 }});
DataCollection.Add(new Employee { Name = "Nancy Davolio",Designation = "Marketing Executive",EmpID = "EMP035",Country = "USA",ParentId = 1,Treedata = new TreeData() { ID = 21 }});
DataCollection.Add(new Employee { Name = "Andrew Fuller",Designation = "Sales Representative",EmpID = "EMP045",Country = "UK",ParentId = 1,Treedata = new TreeData() { ID = 21 }});
DataCollection.Add(new Employee { Name = "Anne Dodsworth",FullName = "AnneDodsworth",Designation = "Sales Representative",EmployeeID = 5,EmpID = "EMP091",Country = "USA",ParentId = null,Treedata = new TreeData() { ID = 21 }});
DataCollection.Add(new Employee { Name = "Michael Suyama",FullName = "MichaelSuyama",Designation = "Sales Representative",EmployeeID = 6,EmpID = "EMP110",Country = "UK",ParentId = 5,Treedata = new TreeData() { ID = 21 }});
DataCollection.Add(new Employee { Name = "Robert King", Designation = "Chief Executive Officer", EmployeeID= 1, EmpID = "EMP001", Country = "USA", ParentId = null});
DataCollection.Add(new Employee { Name = "David william", Designation = "Vice President", EmployeeID = 2, EmpID = "EMP004", Country = "USA", ParentId = 1 });
DataCollection.Add(new Employee { Name = "Nancy Davolio", Designation = "Marketing Executive", EmployeeID= 3, EmpID = "EMP035", Country = "USA", ParentId = 1 });
DataCollection.Add(new Employee { Name = "Andrew Fuller", Designation = "Sales Representative", EmployeeID = 4,EmpID = "EMP045", Country = "UK", ParentId = 1});
DataCollection.Add(new Employee { Name = "Anne Dodsworth", FullName = "AnneDodsworth", Designation = "Sales Representative", EmployeeID = 5, EmpID = "EMP091", Country = "USA", ParentId = null });
DataCollection.Add(new Employee { Name = "Michael Suyama", FullName = "MichaelSuyama", Designation = "Sales Representative", EmployeeID = 6, EmpID = "EMP110", Country = "UK", ParentId = 5 });
return DataCollection;
}
}
Expand Down
Loading