从DataSource获取分组数据而不使用serverGrouping

时间:2015-05-26 16:01:41

标签: jquery kendo-ui

是否可以从DataSource中获取分组数据,就好像它是服务器端分组一样?

var ds = new kendo.data.DataSource({
    data: [{
        name: "John Doe",
        gender: "male",
        age: 33
    }],
    group:[{
        field: "gender"
    }]
});

ds.data(); // Returns an array of models if you are client-side grouping but an array of grouped models if you are server-side grouping

我希望最后一行(或替代方法)返回分组数据,就像将serverGrouping设置为true(以及远程绑定)一样。这可能吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试使用dataSource的view method,它返回dataItems,并应用相应的分组,分页,过滤等。

>peverify NVSavegameSerializer.dll

Microsoft (R) .NET Framework PE Verifier.  Version  4.0.30319.33440
Copyright (c) Microsoft Corporation.  All rights reserved.

[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x000000B7][found ref 'CityB
uilder.CBMap+Tile'][expected value 'CityBuilder.CBMap+Tile'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000085][found ref 'CityB
uilder.CBMap+InventoryEntry'][expected value 'CityBuilder.CBMap+InventoryEntry']
 Unexpected type on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000053][found ref 'CityB
uilder.CBMap+Captain'][expected value 'CityBuilder.CBMap+Captain'] Unexpected ty
pe on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000021][found ref 'CityB
uilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected
type on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000166][found ref 'CityBu
ilder.CBMap+Tile'][expected value 'CityBuilder.CBMap+Tile'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000172][found value 'City
Builder.CBMap+Tile'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on the
stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000109][found ref 'CityBu
ilder.CBMap+InventoryEntry'][expected value 'CityBuilder.CBMap+InventoryEntry']
Unexpected type on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000115][found value 'City
Builder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected ty
pe on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x000000AC][found ref 'CityBu
ilder.CBMap+Captain'][expected value 'CityBuilder.CBMap+Captain'] Unexpected typ
e on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x000000B8][found value 'City
Builder.CBMap+Captain'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004F][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005B][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x000000FF][found value 'Cit
yBuilder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
 the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x0000005B][found value 'Cit
yBuilder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
 the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000018B][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000019D][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004B][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005D][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x000000FF][found value 'Cit
yBuilder.CBMap+Captain'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x0000005B][found value 'Cit
yBuilder.CBMap+Captain'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000018B][found value 'City
Builder.CBMap+Captain'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000019D][found ref 'CityBu
ilder.CBMap+Captain'][expected value 'CityBuilder.CBMap+Captain'] Unexpected typ
e on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004B][found value 'City
Builder.CBMap+Captain'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005D][found ref 'CityBu
ilder.CBMap+Captain'][expected value 'CityBuilder.CBMap+Captain'] Unexpected typ
e on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x000000FF][found value 'Cit
yBuilder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x0000005B][found value 'Cit
yBuilder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000018B][found value 'City
Builder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected ty
pe on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000019D][found ref 'CityBu
ilder.CBMap+InventoryEntry'][expected value 'CityBuilder.CBMap+InventoryEntry']
Unexpected type on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004B][found value 'City
Builder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected ty
pe on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005D][found ref 'CityBu
ilder.CBMap+InventoryEntry'][expected value 'CityBuilder.CBMap+InventoryEntry']
Unexpected type on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x000000FF][found value 'Cit
yBuilder.CBMap+Tile'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on the
 stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x0000005B][found value 'Cit
yBuilder.CBMap+Tile'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on the
 stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000018B][found value 'City
Builder.CBMap+Tile'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on the
stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000019D][found ref 'CityBu
ilder.CBMap+Tile'][expected value 'CityBuilder.CBMap+Tile'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004B][found value 'City
Builder.CBMap+Tile'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on the
stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005D][found ref 'CityBu
ilder.CBMap+Tile'][expected value 'CityBuilder.CBMap+Tile'] Unexpected type on t
he stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000195][found value 'Cit
yBuilder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
 the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000024D][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000025E][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000090][found value 'Cit
yBuilder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
 the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000113][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000125][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x0000005B][found value 'Cit
yBuilder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
 the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004B][found value 'City
Builder.CBMap+Building'][expected ref 'Cuborph.CXPoolIndex'] Unexpected type on
the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000005D][found ref 'CityBu
ilder.CBMap+Building'][expected value 'CityBuilder.CBMap+Building'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000002B] Cannot change ini
tonly field outside its .ctor.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Write][offset 0x00000035][found value 'Cit
yBuilder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected t
ype on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x00000038][found value 'City
Builder.CBMap+InventoryEntry'][expected ref 'Cuborph.CXPoolIndex'] Unexpected ty
pe on the stack.
[IL]: Error: [C:\data\projects\innervative\nova\unity\Assets\Plugins\NVSavegameS
erializer.dll : NVSavegameSerializer::Read][offset 0x0000004A][found ref 'CityBu
ilder.CBMap+InventoryEntry'][expected value 'CityBuilder.CBMap+InventoryEntry']
Unexpected type on the stack.
49 Error(s) Verifying NVSavegameSerializer.dll