Please see this example
I want to update the columns afte the kendo grid initiated.
For example the current columns definition is as this:
columns: [{
field: "FirstName",
title: "First Name",
width: "120px"
},{
field: "LastName",
title: "Last Name",
width: "120px"
},{
field: "Country",
width: "120px"
},{
field: "City",
width: "120px"
},{
field: "Title"
}]
After the grid presented, I want to update the definition of columns as this:
var newCol = [{
field: "FirstName",
title: "You First Name",
width: "200px"
},{
field: "LastName",
title: "You Last Name",
width: "200px"
},{
field: "Title"
}]
I want this function since it lets users dynamically change the whole grid. Not only the dataSource, but also the columns. They can choose to reset the width, title. They can choose to query the data they want and present it in the grid with self-defined columns configuration.
I know that I can destroy the grid then create another, but that might not be necessary, right? Any help is appreciated.
Thanks.