angularjs - How to use checkbox in editableCellTemplate?
问题描述
Please look at the following code:
{
name: 'روش محاسبه',
field: 'feeType',
enableCellEdit: true,
editableCellTemplate: 'ui-grid/dropdownEditor',
editDropdownValueLabel: 'feeType',
editDropdownIdLabel: 'feeType',
width: '*'
},
How can I use checkbox instead of dropdown? Thanks.
解决方案
You need to create your own html file template and then you can add checkbox in the template. You can find available html ui-grid edit feature templates at https://github.com/angular-ui/ui-grid/tree/master/packages/edit/src/templates
Example:
<div class="ui-grid-cell-edit-contents">
<input type="checkbox" data-ng-model="MODEL_COL_FIELD" />
</div>
推荐阅读
- android - 以编程方式将recyleview的三项放在屏幕中
- java - 如何获取文本文件中每个字符的坐标?
- .htaccess - htaccess 过滤器不起作用
- java - spring mvc中的自定义字段访问器而不是beanWrapper
- couchdb - 搜索在 CouchDB 中注册用户的最佳实践
- java - ScheduledExecutorService 在给定时间段内以给定时间速率执行任务
- c# - Unity 无标记地理定位 AR
- r - 时间累计
- python-3.x - Python multiproccesing.Procces 不并行运行
- javascript - 在数组的开头放置一个空值