hi:
my grid view data is using databound:
@model List<StockBetaVolatility>
@(Html.KendoGrid<StockBetaVolatility>()
.Name("MainGridTable")
.EnableCustomBinding(true)
.Columns(columns =>
{
columns.Bound(p => p.TradeDate).Width(100);
columns.ForeignKey(p => p.StockID, Shared.StockBaseNameList());
columns.Bound(p => p.StockBeta);
columns.Bound(p => p.StockVolatility);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Action("AjaxRead", ViewContext.ControllerName())
.Data("PanelBarParameters"))
.ServerOperation(true)
)
.DefaultFormat()
.Events(events => events.Change("GridMainSelect"))
)
in the browser is show B,
columns define:
[DisplayName("stockβvalue")]
public decimal StockBeta { get; set; }
how can i do?
6 Answers, 1 is accepted
When the Grid is configured for Ajax binding, you can use the Title() method to specify the column title (sample screenshots attached).
I hope this helps.
Regards,
Dimiter Topalov
Telerik by Progress
hi Dimiter :
thanks for your replay.
I trying your solution,but that's not work:
@model List<
StockBetaVolatility
><
br
>@(Html.KendoGrid<
StockBetaVolatility
>()<
br
> .Name("MainGridTable")<
br
> .EnableCustomBinding(true)<
br
> .Columns(columns =><
br
> {<
br
> columns.Bound(p => p.TradeDate).Width(100);<
br
><
br
> columns.ForeignKey(p => p.StockID, Shared.StockBaseNameList());<
br
> columns.Bound(p => p.StockBeta).Title("stockβvalue");<
br
> columns.Bound(p => p.StockVolatility);<
br
><
br
> })<
br
> .DataSource(dataSource => dataSource<
br
> .Ajax()<
br
> .Read(r => r.Action("AjaxRead", ViewContext.ControllerName())<
br
> .Data("PanelBarParameters"))<
br
> .ServerOperation(true)<
br
><
br
> )<
br
> .DefaultFormat()<
br
> .Events(events => events.Change("GridMainSelect"))<
br
>)
Maybe telerik version is problem point?
This project telerik version is Q3 2015 9.2.15.1216
compiler :Visual studion 2013
thanks!
It looks like the web page has CSS styles that capitalize the Grid column titles. As a result it is normal for the lowercase "β" to appear as uppercase, namely "B". The only Kendo UI theme, which capitalizes Grid column titles is "Office365", which you don't seem to be using, so the issue is most likely caused by custom CSS code. Please verify and let me know if you need more information related to Kendo UI.
Regards,
Dimo
Telerik by Progress
hi Dimo:
That's css code problem,i solved the question
I override "office365" css code text-transform to none
1.
<script>
2.
$(
function
() {
3.
$(
"#GridName"
).find(
'th'
).css(
"text-transform"
,
"none"
);
4.
});
5.
</script>
Thanks a lot!
The desired result can be achieved with CSS only, no need for JavaScript.
.k-grid th.k-header {
text-transform
:
none
;
}
/* or if you want to target one Grid instance only */
#GridName th {
text-transform
:
none
;
}
Regards,
Dimo
Telerik by Progress
Hi Dimo:
I try using your way in my css code,
both way is work!
Thanks a lot again.