Hi,
I have probably missed something really obvious, but I just can't seem to find the right property.
I have a Grid bound to an OData source from which I am auto generating the columns. When this happens the column titles are not split around capital letters so they are readable unlike when they are bound individually. I tried using a column build action to set the titles of the columns, but it doesn't seem to work... unless I am doing something not quite right.
A bit of example code here (I have just tried to change the column name to a set value, but it doesnt work when I try to split the column member name either)
@(Html.Kendo().Grid<
dynamic
>()
.Name(Model.Name)
.Columns(columns =>
{
//columns.AutoGenerate(true);
//columns.AutoGenerate(col => col.Title = col.Member.SplitPascalCase());
columns.AutoGenerate(col => col.Title = "COLUMN NAME");
})
.DataSource(dataSource => dataSource
.Custom()
.Type("odata")
.Schema(schema =>
{
schema.Data("value")
.Total
(
@<
text
>
function total(data)
{
return data["odata.count"];
}
</
text
>
);
})
.Transport(transport =>
{
transport.Read(read => read.Url(Model.ODataPath).DataType("json"));
}
)
.PageSize(Model.PageSize)
.ServerPaging(true)
.ServerSorting(true)
.ServerFiltering(true)
)
thanks,
Rob