【发布时间】:2015-03-14 14:08:34
【问题描述】:
数据源包含许多记录,但每12条记录代表1个实体的12个特征,按固定顺序排序。然后将行按 3 列(按“AccountName”、“OportunityName”和“OpportunityId”)分组,最深层次的组包含这 12 个特征。使用“GridOperationMode.Server”时一切正常:
但为了提高性能,我们决定将操作模式更改为客户端 - 'GridOperationMode.Client'。在那之后性能变得更好,但是这 12 个特征丢失了它们在 Chrome 中进行排序 - 对于每个组,它们以随机顺序呈现。我检查了 IE 和 FF 中的问题 - 发现他们没有这样的问题。任何想法如何修复 chrome 中的错误顺序?
使用 GridOperationMode.Client 时 Chrome 中的顺序错误
JS(缩短) - 绑定网格:
function populateForecastClosedGrid(controllerActionUrl) {
var gridForecastClosed = $("#gridFORECASTREPORT").data("tGrid");
var accountId = $('#accountsFilterCombo').data('tComboBox').value();
gridForecastClosed.ajax.selectUrl = controllerActionUrl + '?checkDate=' + new Date().formatMMDDYYYY() + '&accountId=' + accountId;
gridForecastClosed.showBusy();
$.post(gridForecastClosed.ajax.selectUrl, function (data) {
gridForecastClosed.dataSource.data([]);;
gridForecastClosed.dataBind(data);
});
}
网格(缩短):
@(Html.Telerik().Grid()
.Name("gridFORECASTREPORT")
.Columns(列 => { ... }
.DataKeys(keys => keys.Add(c => c.OpportunityId))
.DataBinding(dataBinding => dataBinding.Ajax().OperationMode(GridOperationMode.Client))
.Groupable(分组 => 分组。Groups(组 =>
{
groups.Add(c => c.AccountName);
groups.Add(c => c.OpportunityName);
groups.Add(c => c.OpportunityId);
}).可见(假))
.EnableCustomBinding(true)
.Pageable(p => p.PageSize(396)))
【问题讨论】:
标签: asp.net telerik telerik-grid telerik-mvc