【发布时间】:2020-01-11 05:44:11
【问题描述】:
【问题讨论】:
标签: c# blazor syncfusion
【问题讨论】:
标签: c# blazor syncfusion
来自 Syncfusion 的问候。
从我们的 2019 第 4 卷版本 (17.4.0.39) 开始,我们仅将 Query 属性的类型更改为 Query 类。在该版本之前,Query 属性的类型将是字符串。请参阅以下有关我们在 Grid 中所做更改的发行说明,以供您参考
https://ej2.syncfusion.com/blazor/documentation/release-notes/17.4.39/#grid
所以请升级到最新版本(17.4.0.42 - 因为我们已经修复了该主要版本之后的许多重大问题)以解决报告的查询。还要确保在示例项目中导入 Syncfusion Blazor Data 实例。
@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Buttons
@using Syncfusion.EJ2.Blazor.Data
@using Syncfusion.EJ2.Blazor.Grids
If you want to use the same approach in 17.3.0.21-beta version, then kindly specify the query property value in form of string (like below).
<EjsGrid ModelType="Model" DataSource="@Employees" Height="315px">
<GridTemplates>
<DetailTemplate>
@{
var employee = (context as EmployeeData);
<EjsGrid DataSource="@Orders" Query="@QueryData(employee)">
. . . . . .
</EjsGrid>
}
</DetailTemplate>
</GridTemplates>
. . . . . . .. . .
</EjsGrid>
@code{
public int? Val { get; set; }
public EmployeeData Model = new EmployeeData();
public string QueryData(EmployeeData employee)
{
return $"new ej.data.Query().where('EmployeeID', 'equal', {employee.EmployeeID})";
}
. . . . . . . ..
public class EmployeeData
{
public int? EmployeeID { get; set; }
. . . . . . . . .
}
}
【讨论】: