Voici travaille DEMO pour créer dynamiquement la grille et afficher/cacher que si la case est cochée
est Ci-dessous l'extrait de code de la démo:
HTML:
<input type="checkbox" data-bind="checked: isVisible, events: { change: clickHandler}">
Show/Hide the datagrid
<div data-role="grid"
data-auto-bind="false"
data-filterable="true"
data-editable="true"
data-toolbar="['create', 'save']"
data-columns="[
{ 'field': 'ProductName', 'width': 270 },
{ 'field': 'UnitPrice' },
]"
data-bind="source: products,
visible: isVisible,
events: {
save: onSave
}"
style="height: 200px"></div>
</div>
JS:
var viewModel = kendo.observable({
isVisible: false,
clickHandler: function(e) {
console.log('clicked ', e);
this.products.fetch();//load the data in the datagrid. This will be executed only for once. If you want the datagird to be preloaded with the data then set the grid attribute "autoBind" to true
},
.......
.....
S'il vous plaît élaborer mieux votre question, il est difficile d'obtenir votre point ici. – DontVoteMeDown