Home > Web Front-end > JS Tutorial > body text

Bootstrap issues about cellStyle and formatter in table

一个新手
Release: 2017-10-02 09:45:58
Original
7604 people have browsed it

When the company does projects, it needs to use different tables in the bootstrap table, and display different background colors according to the situation.

Error reporting function:

function color(value,row,index){
		if(row.appid==2){//已经提交数据,颜色变化
			return {
				css:{
					'background':'#F0E68C'
				}
			}
		}
	}
Copy after login

Error reporting content:


##Modified function:

function color(value,row,index){
		if(row.appid==2){//已经提交数据,颜色变化
			return {
				css:{
					'background':'#F0E68C'
				}
			}
		}
		return {};
	}
Copy after login
bootstrap table , this kind of custom function must have a return value.

The above is the detailed content of Bootstrap issues about cellStyle and formatter in table. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template