我正在使用Angular UI Grid。我想根据复选框输入显示UI Grid。我能够隐藏和显示基于复选框的网格,但永远不能在UI网格中显示列。
HTML代码
<table>
<tr>
<td valign="top">
<label>Recursive</label>
</td>
</tr>
<tr>
<td valign="top">
<input type="checkbox" ng-model="eventadd.md_eventrecursive"
ng-true-value="true" ng-false-value="false">
</td>
</tr>
</table>
<br/>
<div ng-show="eventadd.md_eventrecursive">
<div ui-grid="gridRecursiveEvent" class="gridSmallStyle"></div>
</div>
JS代码
$scope.gridRecursiveEvent = {
columnDefs: [
{
field: 'Name', displayName: 'Name'
},
{
field: 'Id', displayName: 'Id',
},
],
}
选中Recursive事件时,它会显示Grid但没有Columns
需要你的帮助。