How to change the color of a grid column in MVVM? i would like something like this:
first column: green
second column: yellow
<div data-role="grid"
data-toolbar="DOC"
data-columns="[
{ 'field': 'doc1'},
{ 'field': 'doc2' }
]"
data-bind="source: sourceList"></div>
You can add the following style to your CSS or page:
#grid th:nth-child(1) {
background: green;
}
#grid th:nth-child(2) {
background: yellow;
}
You'll need to set the selectors according to your setup.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.