jquery - Kendo Grid - How to add columns dynamically? -
this question has answer here:
for grid view have json array of objects filled dynamically.
is possible generate columns dynamically posssibility edit values on model , send them in update request?
thanks advice or example.
same question asked here.
first need resolve columns json array , store them in array. create columns , use grid column option set columns dynamically. need kendo datasource showing data. here great example @paritosh how accomplish need.
var columns = data; var configuration = { editable: true, sortable: true, scrollable: false, columns: columns //set columns here }; var grid = $("#grid").kendogrid(configuration).data("kendogrid"); kendo.bind($('#example'), viewmodel); //viewmodel data in jsfiddle
Comments
Post a Comment