Kendo ui 剑道网格排序错误

Kendo ui 剑道网格排序错误,kendo-ui,kendo-grid,Kendo Ui,Kendo Grid,我有下一个 @(Html.Kendo().Grid<Corporativo.Model.SolicitudProductoVM>() .Name("SolicitudesProducto") .Columns(columns => { columns.Bound(e => e.Consecutivo).Wi

我有下一个

@(Html.Kendo().Grid<Corporativo.Model.SolicitudProductoVM>()
                    .Name("SolicitudesProducto")
                    .Columns(columns =>
                    {
                        columns.Bound(e => e.Consecutivo).Width(20).Title("CÓDIGO");
                        columns.Bound(e => e.Desc_Cliente).Width(80).Groupable(false).Title("CLIENTE");
                        columns.Bound(e => e.Fecha).Width(40).Groupable(false).Title("FECHA");
                        columns.Bound(e => e.Imp_Total).Width(40).Groupable(false).Title("IMP. TOTAL");
                    })                    
                    .Filterable()
                    .Pageable()
                    .Scrollable()
                    .DataSource(dataSource => dataSource
                        .Ajax()                        
                        .Read(read => read.Action("GetAllSolicitudesJSON", "CrmProductRequest", null))
                    )
                )
@(Html.Kendo().Grid())
.名称(“委托书产品”)
.列(列=>
{
列。绑定(e=>e.conceutivo)。宽度(20)。标题(“CÓDIGO”);
columns.Bound(e=>e.Desc_Cliente).Width(80).Groupable(false).Title(“Cliente”);
columns.Bound(e=>e.Fecha).Width(40).Groupable(false).Title(“Fecha”);
columns.Bound(e=>e.Imp_Total).宽度(40).可分组(false).标题(“Imp.Total”);
})                    
.可过滤()
.Pageable()
.Scrollable()
.DataSource(DataSource=>DataSource
.Ajax()
.Read(Read=>Read.Action(“GetAllCommissuedJSON”,“CrmProductRequest”,null))
)
)
下一个错误

找不到基元类型的公共属性进行排序


想法

我的剑道UI有这个错误,我的视图中没有使用排序。对我来说,我发现视图模型存在问题,我使用视图模型来阻止EF对象引起循环错误的不同问题。如果这仍然是一个问题,并且您使用视图模型,请尝试使用完整的getter和setter设置属性

我的视图模型属性声明如下:*

public int OrderID;
我和我将它们更改为此,以使Kendo.ToDataSource()正常工作:

public int OrderID
{
    get;
    set;
}
*这些属性的其他语法问题也可能导致此错误


这篇文章解释了如何摆脱间接帮助我得出这个结论的循环引用。我希望这对像我一样偶然发现这个问题的人仍然有帮助。

您是否添加了以下内容:
Sortable
?否,有Sortable()和没有Sortable()相同的错误…可能您的模型类属性需要公开?