Set/Modify Title in kendo mvc grid?

一曲冷凌霜 提交于 2019-12-11 05:15:46

问题


I'm trying to get hold of column bound info . so that i can add few settings(Width,Title etc) to Kendo grid where columns are created on fly .

Code:

@(Html.Kendo().Grid<dynamic>().Name("Grid").AutoBind(false) //model is dynamic
.Columns(columns => {
for (int index = 0; index < Model.mycolumns.Count; index++)
 { 
   var item = Model.mycolumns.ElementAt(index);
   columns.Bound(item.Value, item.Key).Title("Test").Filterable(false); // Title setting ignored 
 } 
});

when i set filterable false or Title to some value its ignored completely .

Interestingly when i comment complete .columns( bound code still i get to load grid with default settings and Title .

I have no control on grid settings (tough debugger fires) if i want to modify Title or freeze columns by applying lockable etc . whatever i write in cshtml under bound it's ignoring .

Note : mycolumns are of type Dictionary<string, System.Type> returning from controller on load

来源:https://stackoverflow.com/questions/37437363/set-modify-title-in-kendo-mvc-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!