Change column title in kendo grid

3

How can I change the title of this Kendo MVC Grid column using Javascript using a button in another column?

This is the column to which I want to change the title:

columns.Bound(c => c.segundo_nombre).Title("2do Nombre").Width(20);

And this is the button I want to use to change the title:

columns.Command(commands => commands.Custom("Cambiar").Click("change"));
    
asked by Felipe 11.08.2016 в 19:25
source

1 answer

1

You'll see with the kendo, you can not do miracles either, to put a title in each column you use a syntax like this:

    <div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [ { field: "name", title: "Name" } ],
  dataSource: [ { name: "Jane Doe" }, { name: "John Doe" } ]
});
</script>

If you want to do it from a function use the detailTemplate I leave the information in this link: link From there you can use the dataSource information in these functions and treat it to your liking.

    
answered by 11.08.2016 в 19:49