问题
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