Skip to content

Commit e4ab7a1

Browse files
Merge branch 'hotfix/hotfix-v27.1.48' into Es-892868-PortTooltip
2 parents 16dcd49 + fe16340 commit e4ab7a1

File tree

87 files changed

+2937
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2937
-81
lines changed

blazor-toc.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3404,6 +3404,8 @@
34043404
<li> <a href="/blazor/multicolumn-combobox/getting-started">Blazor Server and WASM App</a></li>
34053405
</ul>
34063406
</li>
3407+
<li><a href="/blazor/multicolumn-combobox/sorting">Sorting</a></li>
3408+
<li> <a href="/blazor/multicolumn-combobox/virtualization">Virtualization</a></li>
34073409
</ul>
34083410
</li>
34093411
<li>MultiSelect Dropdown

blazor/gantt-chart/data-binding.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ N> * Indent/Outdent is not supported for Hierarchy Data.
6767

6868
### Self-Referential / Flat Data Binding
6969

70-
The Gantt Chart component can be bound with self-referential data by mapping the data source field values to the `Id` and `ParentID` properties.
70+
The Gantt Chart component uses a self-referential data binding model to represent hierarchical tasks, in which two key fields from your data source has to be mapped to the [Id](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Id) field and the [ParentID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_ParentID) field of [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html). Together, these two fields define the parent-child relationship between tasks.
7171

72-
* ID field: This field contains unique values used to identify each individual task and it is mapped to the `Id` property.
73-
* Parent ID field: This field contains values that indicate parent tasks and it is mapped to the `ParentID` property.
72+
* **Id field**: A field in each data object of the data source that uniquely identifies the task. This field name is mapped to the `Id` property of `GanttTaskFields`.
73+
* **ParentID field**: A field in each data object of the data source that contains a value corresponding to the **Id Field** to establish a parent-child relationship between tasks. This field name is mapped to the `ParentID` property of `GanttTaskFields`.
7474

7575
```cshtml
7676
@using Syncfusion.Blazor.Gantt

blazor/gantt-chart/getting-started-with-web-app.md

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -95,33 +95,16 @@ Add the Syncfusion Blazor Gantt Chart component in `.razor` file inside the `Pag
9595
{% tabs %}
9696
{% highlight razor %}
9797

98-
<SfGantt TValue="TaskData">
99-
</SfGantt>
100-
101-
@code{
102-
public class TaskData
103-
{
104-
public int TaskId { get; set; }
105-
public string TaskName { get; set; }
106-
public DateTime StartDate { get; set; }
107-
public DateTime EndDate { get; set; }
108-
public string Duration { get; set; }
109-
public int Progress { get; set; }
110-
public int? ParentId { get; set; }
111-
}
112-
}
113-
114-
{% endhighlight %}
115-
{% endtabs %}
116-
117-
## Binding Blazor Gantt Chart with Data
118-
119-
Bind data with the Gantt Chart component by using the `DataSource` property. It accepts the list objects or the DataManager instance.
120-
121-
{% tabs %}
122-
{% highlight razor %}
123-
12498
<SfGantt DataSource="@TaskCollection" Height="450px" Width="700px">
99+
<GanttTaskFields Id="TaskId" Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentId">
100+
</GanttTaskFields>
101+
<GanttColumns>
102+
<GanttColumn Field="TaskId" HeaderText="Task ID"></GanttColumn>
103+
<GanttColumn Field="TaskName" HeaderText="Task Name"></GanttColumn>
104+
<GanttColumn Field="StartDate" HeaderText="Start Date"></GanttColumn>
105+
<GanttColumn Field="Duration" HeaderText="Duration"></GanttColumn>
106+
<GanttColumn Field="Progress" HeaderText="Progress"></GanttColumn>
107+
</GanttColumns>
125108
</SfGantt>
126109

127110
@code{
@@ -156,9 +139,13 @@ Bind data with the Gantt Chart component by using the `DataSource` property. It
156139
{% endhighlight %}
157140
{% endtabs %}
158141

159-
## Mapping task fields
142+
## Binding Gantt Chart with Data and Mapping Task Fields
143+
144+
Bind data with the Gantt Chart component by using the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_DataSource) property. It accepts the list objects or the DataManager instance.
145+
146+
Additionally, task-related fields from the data source are mapped to the Gantt Chart component using the [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html) property. This property ensures that the necessary task fields, such as [Id](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Id), [Name](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Name), [StartDate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_StartDate), [EndDate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_EndDate), [Duration](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Duration), and [ParentID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_ParentID) are properly linked to the corresponding data source fields, allowing the Gantt Chart to render tasks accurately. The columns in the Gantt Chart are automatically rendered based on the properties specified in `GanttTaskFields`, ensuring that the necessary columns are displayed to represent the task data.
160147

161-
The data source fields that are required to render the tasks are mapped to the Gantt Chart component using the [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html) property.
148+
This following sample shows self-referential data binding in the Gantt Chart by mapping the data source fields to the `Id` and `ParentID` properties. For more detailed information, refer to the [documentation](https://blazor.syncfusion.com/documentation/gantt-chart/data-binding#self-referential--flat-data-binding).
162149

163150
{% tabs %}
164151
{% highlight razor %}
@@ -202,12 +189,14 @@ The data source fields that are required to render the tasks are mapped to the G
202189

203190
## Defining columns
204191

205-
Gantt Chart has an option to define columns as an array. You can customize the Gantt Chart columns using the following properties:
192+
Gantt Chart has an option to define columns as an array. You can manage the order and customize the Gantt Chart columns using the following properties:
206193

207194
* [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Field): Maps the data source fields to the columns.
208195
* [HeaderText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_HeaderText): Changes the title of columns.
209196
* [TextAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_TextAlign): Changes the alignment of columns. By default, columns will be left aligned. To change the columns to right align, set `TextAlign` to right.
210197
* [Format](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Format): Formats the number and date values to standard or custom formats. Here, it is defined for the conversion of numeric values to currency.
198+
* [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Visible): Show or hide a particular column. By default, columns are visible. Set this property to **false** to hide the column or **true** to make it visible.
199+
* [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Width): To specify the width of the column, which can be defined in **pixels** or as a **percentage** of the total column width.
211200

212201
{% tabs %}
213202
{% highlight razor %}
@@ -259,7 +248,7 @@ Gantt Chart has an option to define columns as an array. You can customize the G
259248
{% endhighlight %}
260249
{% endtabs %}
261250

262-
For further details regarding Columns, refer [here](https://blazor.syncfusion.com/documentation/gantt-chart/columns).
251+
For further details regarding columns, refer [here](https://blazor.syncfusion.com/documentation/gantt-chart/columns).
263252

264253
## Enable editing
265254

blazor/gantt-chart/getting-started.md

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -112,33 +112,16 @@ Add the Syncfusion Blazor Gantt Chart component in the **~/Pages/Index.razor** f
112112
{% tabs %}
113113
{% highlight razor %}
114114

115-
<SfGantt TValue="TaskData">
116-
</SfGantt>
117-
118-
@code{
119-
public class TaskData
120-
{
121-
public int TaskId { get; set; }
122-
public string TaskName { get; set; }
123-
public DateTime StartDate { get; set; }
124-
public DateTime EndDate { get; set; }
125-
public string Duration { get; set; }
126-
public int Progress { get; set; }
127-
public int? ParentId { get; set; }
128-
}
129-
}
130-
131-
{% endhighlight %}
132-
{% endtabs %}
133-
134-
## Binding Blazor Gantt Chart with Data
135-
136-
Bind data with the Gantt Chart component by using the `DataSource` property. It accepts the list objects or the DataManager instance.
137-
138-
{% tabs %}
139-
{% highlight razor %}
140-
141115
<SfGantt DataSource="@TaskCollection" Height="450px" Width="700px">
116+
<GanttTaskFields Id="TaskId" Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentId">
117+
</GanttTaskFields>
118+
<GanttColumns>
119+
<GanttColumn Field="TaskId" HeaderText="Task ID"></GanttColumn>
120+
<GanttColumn Field="TaskName" HeaderText="Task Name"></GanttColumn>
121+
<GanttColumn Field="StartDate" HeaderText="Start Date"></GanttColumn>
122+
<GanttColumn Field="Duration" HeaderText="Duration"></GanttColumn>
123+
<GanttColumn Field="Progress" HeaderText="Progress"></GanttColumn>
124+
</GanttColumns>
142125
</SfGantt>
143126

144127
@code{
@@ -169,13 +152,16 @@ Bind data with the Gantt Chart component by using the `DataSource` property. It
169152
return Tasks;
170153
}
171154
}
172-
173155
{% endhighlight %}
174156
{% endtabs %}
175157

176-
## Mapping task fields
158+
## Binding Gantt Chart with Data and Mapping Task Fields
159+
160+
Bind data with the Gantt Chart component by using the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_DataSource) property. It accepts the list objects or the DataManager instance.
161+
162+
Additionally, task-related fields from the data source are mapped to the Gantt Chart component using the [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html) property. This property ensures that the necessary task fields, such as [Id](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Id), [Name](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Name), [StartDate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_StartDate), [EndDate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_EndDate), [Duration](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_Duration), and [ParentID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html#Syncfusion_Blazor_Gantt_GanttTaskFields_ParentID) are properly linked to the corresponding data source fields, allowing the Gantt Chart to render tasks accurately. The columns in the Gantt Chart are automatically rendered based on the properties specified in `GanttTaskFields`, ensuring that the necessary columns are displayed to represent the task data.
177163

178-
The data source fields that are required to render the tasks are mapped to the Gantt Chart component using the [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html) property.
164+
This following sample shows self-referential data binding in the Gantt Chart by mapping the data source fields to the `Id` and `ParentID` properties. For more detailed information, refer to the [documentation](https://blazor.syncfusion.com/documentation/gantt-chart/data-binding#self-referential--flat-data-binding).
179165

180166
{% tabs %}
181167
{% highlight razor %}
@@ -219,12 +205,14 @@ The data source fields that are required to render the tasks are mapped to the G
219205

220206
## Defining columns
221207

222-
Gantt Chart has an option to define columns as an array. You can customize the Gantt Chart columns using the following properties:
208+
Gantt Chart has an option to define columns as an array. You can manage the order and customize the Gantt Chart columns using the following properties:
223209

224210
* [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Field): Maps the data source fields to the columns.
225211
* [HeaderText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_HeaderText): Changes the title of columns.
226212
* [TextAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_TextAlign): Changes the alignment of columns. By default, columns will be left aligned. To change the columns to right align, set `TextAlign` to right.
227213
* [Format](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Format): Formats the number and date values to standard or custom formats. Here, it is defined for the conversion of numeric values to currency.
214+
* [Visible](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Visible): Show or hide a particular column. By default, columns are visible. Set this property to **false** to hide the column or **true** to make it visible.
215+
* [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Width): To specify the width of the column, which can be defined in **pixels** or as a **percentage** of the total column width.
228216

229217
{% tabs %}
230218
{% highlight razor %}
@@ -276,7 +264,7 @@ Gantt Chart has an option to define columns as an array. You can customize the G
276264
{% endhighlight %}
277265
{% endtabs %}
278266

279-
For further details regarding Columns, refer [here](https://blazor.syncfusion.com/documentation/gantt-chart/columns).
267+
For further details regarding columns, refer [here](https://blazor.syncfusion.com/documentation/gantt-chart/columns).
280268

281269
## Enable editing
282270

@@ -477,7 +465,7 @@ You can find the full information regarding Predecessors from [here](https://bla
477465
## Handling exceptions
478466
Exceptions that occur during Gantt actions can be handled without stopping the application. These error messages or exception details can be acquired using the [OnActionFailure](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_OnActionFailure) event.
479467

480-
The argument passed to the [OnActionFailure](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_OnActionFailure)event contains the error details returned from the server.
468+
The argument passed to the [OnActionFailure](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_OnActionFailure) event contains the error details returned from the server.
481469

482470
N> We recommend you bind the `OnActionFailure` event during your application development phase, this helps you to find any exceptions. You can pass these exception details to our support team to get a solution as early as possible.
483471

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@using Syncfusion.Blazor.MultiColumnComboBox
2+
@using Syncfusion.Blazor.Data
3+
4+
<SfMultiColumnComboBox TItem="EmployeeData" TValue="string" AllowFiltering=true ValueField="EmployeeID" OnActionBegin="@OnActionBeginhandler" TextField="FirstName" PopupWidth="600px" Placeholder="e.g. Andrew">
5+
<SfDataManager Url="https://blazor.syncfusion.com/services/release/api/Employees" CrossDomain="true" Adaptor="Syncfusion.Blazor.Adaptors.WebApiAdaptor"></SfDataManager>
6+
</SfMultiColumnComboBox>
7+
8+
@code {
9+
public Query RemoteQuery = new Query();
10+
public class EmployeeData
11+
{
12+
public int EmployeeID { get; set; }
13+
public string FirstName { get; set; }
14+
public string LastName { get; set; }
15+
public string Country { get; set; }
16+
}
17+
private void OnActionBeginhandler(ActionBeginEventArgs args)
18+
{
19+
// Here, you can customize your code.
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@using Syncfusion.Blazor.MultiColumnComboBox
2+
@using Syncfusion.Blazor.Data
3+
4+
<SfMultiColumnComboBox TItem="EmployeeData" TValue="string" AllowFiltering=true ValueField="EmployeeID" OnActionComplete="@OnActionCompletehandler" TextField="FirstName" PopupWidth="600px" Placeholder="e.g. Andrew">
5+
<SfDataManager Url="https://blazor.syncfusion.com/services/release/api/Employees" CrossDomain="true" Adaptor="Syncfusion.Blazor.Adaptors.WebApiAdaptor"></SfDataManager>
6+
</SfMultiColumnComboBox>
7+
8+
@code {
9+
public Query RemoteQuery = new Query();
10+
public class EmployeeData
11+
{
12+
public int EmployeeID { get; set; }
13+
public string FirstName { get; set; }
14+
public string LastName { get; set; }
15+
public string Country { get; set; }
16+
}
17+
private void OnActionCompletehandler(ActionCompleteEventArgs<EmployeeData> args)
18+
{
19+
// Here, you can customize your code.
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@using Syncfusion.Blazor.MultiColumnComboBox
2+
@using Syncfusion.Blazor.Data
3+
4+
<SfMultiColumnComboBox TItem="EmployeeData" TValue="string" AllowFiltering=true ValueField="EmployeeID" OnActionFailure="@OnActionFailurehandler" TextField="FirstName" PopupWidth="600px" Placeholder="e.g. Andrew">
5+
<SfDataManager Url="https://blazor.syncfusion.com/services/release/api/Employees" CrossDomain="true" Adaptor="Syncfusion.Blazor.Adaptors.WebApiAdaptor"></SfDataManager>
6+
</SfMultiColumnComboBox>
7+
8+
@code {
9+
public Query RemoteQuery = new Query();
10+
public class EmployeeData
11+
{
12+
public int EmployeeID { get; set; }
13+
public string FirstName { get; set; }
14+
public string LastName { get; set; }
15+
public string Country { get; set; }
16+
}
17+
private void OnActionFailurehandler(Exception args)
18+
{
19+
// Here, you can customize your code.
20+
}
21+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@using Syncfusion.Blazor.MultiColumnComboBox
2+
@using Syncfusion.Blazor.Data
3+
@using Syncfusion.Blazor.Buttons
4+
5+
<div>
6+
<SfMultiColumnComboBox @ref="multicolumnObj" TItem="Games" TValue="string" DataSource="LocalData" AllowFiltering=true ValueField="Game" TextField="Game" PopupWidth="600px" >
7+
</SfMultiColumnComboBox>
8+
</div>
9+
<div>
10+
<SfButton Content="Click to add a new item" OnClick="OnBtnClick"></SfButton>
11+
</div>
12+
13+
14+
@code {
15+
SfMultiColumnComboBox<string, Games> multicolumnObj;
16+
17+
public class Games
18+
{
19+
public string ID { get; set; }
20+
public string Game { get; set; }
21+
public string Category { get; set; } // New field
22+
}
23+
List<Games> LocalData = new List<Games> {
24+
new Games() { ID= "Game1", Game= "American Football", Category= "Outdoor" },
25+
new Games() { ID= "Game2", Game= "Badminton", Category= "Indoor" },
26+
new Games() { ID= "Game3", Game= "Basketball", Category= "Outdoor" },
27+
new Games() { ID= "Game4", Game= "Cricket", Category= "Outdoor" },
28+
new Games() { ID= "Game5", Game= "Football", Category= "Outdoor" },
29+
new Games() { ID= "Game6", Game= "Golf", Category= "Outdoor" },
30+
new Games() { ID= "Game7", Game= "Hockey", Category= "Outdoor" },
31+
new Games() { ID= "Game8", Game= "Rugby", Category= "Outdoor" },
32+
new Games() { ID= "Game9", Game= "Snooker", Category= "Indoor" }
33+
};
34+
35+
public async Task OnBtnClick()
36+
{
37+
await this.multicolumnObj.AddItemsAsync(new List<Games> { new Games() { ID = "Game11", Game = "Tennis", Category ="Outdoor" } });
38+
}
39+
}

0 commit comments

Comments
 (0)