Asp.net mvc 4 剑道格网丢失序列

Asp.net mvc 4 剑道格网丢失序列,asp.net-mvc-4,kendo-ui,kendo-grid,kendo-asp.net-mvc,Asp.net Mvc 4,Kendo Ui,Kendo Grid,Kendo Asp.net Mvc,我正在MVC中开发一个web项目,我们使用kendoui控件 我在KendoGrid中遇到了一些问题。 在其中一个页面中,KendoGrid加载了大约80列,其中40列是动态加载的 columns.Bound(o => o.Altered).Visible(false); columns.Bound(o => o.col1).Width(150); columns.Bound(o => o.col2).Width(150); columns.Bound(o => o.co

我正在
MVC
中开发一个web项目,我们使用
kendoui
控件

我在
KendoGrid
中遇到了一些问题。 在其中一个页面中,KendoGrid加载了大约80列,其中40列是动态加载的

columns.Bound(o => o.Altered).Visible(false);
columns.Bound(o => o.col1).Width(150);
columns.Bound(o => o.col2).Width(150);
columns.Bound(o => o.col3).Width(150);
.
.
.
.
.
 foreach (myModel myObjet in Model.ModelCollection)
 {
     columns.Bound(typeof(string), string.Format("O{0}", myObjet.ObjectNumber)).Width(100).Title(myObjet.ObjectDescription).HtmlAttributes(new { title = myObjet.ObjectDescription + " : #= O1 #" });
     columns.Bound(typeof(string), string.Format("ObjectName{0}", myObjet.ObjectNumber)).Width(100);
 }
它正确地加载了列和行,但问题是它正在丢失它的属性 序列我的意思是,它并没有像我一样呈现专栏
这里提到过。

您以前尝试过对其进行排序吗

foreach (myModel myObjet in Model.ModelCollection.OrderBy(f => f.ObjectNumber))
 {
     columns.Bound(typeof(string), string.Format("O{0}", myObjet.ObjectNumber)).Width(100).Title(myObjet.ObjectDescription).HtmlAttributes(new { title = myObjet.ObjectDescription + " : #= O1 #" });
     columns.Bound(typeof(string), string.Format("ObjectName{0}", myObjet.ObjectNumber)).Width(100);
 }

哪些列的顺序不正确?所有80列,只是静态列,还是动态列?@digawp,40个动态列,如果你看到上面的代码,我最后添加了动态列,但是当它被渲染时,它的顺序类似于s1,s2,s3…s17,d1,d2,d3..d16,s18,s19,s20…s40…d19…d40 s=静态列
d=动态列ObjectNumber的类型是什么?