-
Notifications
You must be signed in to change notification settings - Fork 126
Cell Template Library
RHAD1969 edited this page Oct 22, 2014
·
26 revisions
####If you have your own custom templates, please add to this!####
###Basic Editable Cell Template###
<input type="text" data-bind="value: $parent.entity[$data.field]" style="width: 80px"/>###Editable Only When Selected Template###
<input type="text" data-bind="attr:{ readonly : !$parent.selected() },value: $parent.entity[$data.field]"/>###Span when not selected, Editable when selected###
<div>
<input type="text" data-bind="visible: $parent.selected(), value: $parent.entity[$data.field]" />
<span data-bind="visible: !$parent.selected(), text: $parent.entity[$data.field]"></span>
</div>###Change cell color based on other property###
<div type="text" data-bind="style:{ 'background-color' : $parent.entity['hasError'] ? 'red' : 'green' }, text: getProperty($parent)"></div>###Editable checkbox###
<input type="checkbox" data-bind="checked: $parent.entity[$data.field], attr:{'class': 'kgCellText colt' + $index)}"/>