I am facing one issue related to using the kendo
grid with two buttons .If i click on the first button it should show three columns and if I click on the second button, it should show only two columns. But it doesn't seem to be working .My current example is :
<div id="example" ng-app="KendoDemos">
<div ng-controller="MyCtrl">
<button ng-click="execute1($event)">Execute 1</button>
<button ng-click="execute2($event)">Execute 2</button>
<div kendo-grid="grid" k-options="gridOptions" k-rebind="selectedType"></div>
</div>
</div>
You had a simple error
In both cases you are using dataModel1, you have to use "dataModel2" for gridOptions2
Here is resolved:
http://plnkr.co/edit/Nie7eJVoPmt6xUpnmqnF?p=preview
EDIT:
Now I undestand the problem:
You have this:
But the "columns" should be outside of the DataSource, like this:
Here is working:
http://plnkr.co/edit/qQ2IzHSyGM7SsZxE3BEI?p=preview