after looking all over the web, i can't find how to set the header text to the kendo grid. for example instead of FName i would like it to sat "First name". maybe one of you guys know?
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.FName).Groupable(false);
columns.Bound(p => p.ShemIvri) ;
columns.Bound(p => p.ShemLoazit);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
)
You are looking for the Title
method see also in the documentation
Title
Gets or sets the title of the column.
In your case the code should look like this:
.Columns(columns =>
{
columns.Bound(p => p.FName).Title("First name").Groupable(false);
columns.Bound(p => p.ShemIvri) ;
columns.Bound(p => p.ShemLoazit);
})
or you can put [DisplayName("First Name")] in your model eg:
[DisplayName("First Name")]
[StringLength(100)]
public string FName{ get; set; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With