sat*_*esh 3 javascript slickgrid
在编写自定义单元格格式器时
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext)
Run Code Online (Sandbox Code Playgroud)
这是我们必须遵循的基本定义.我可以在光滑网格中获得有关dataContext参数的解释.它实际上代表了什么.
确切的代码是
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "-";
} else if (value < 50) {
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
} else {
return "<span style='color:green'>" + value + "%</span>";
}
}
Run Code Online (Sandbox Code Playgroud)
我只想要上面代码中的dataContext代表什么
| 归档时间: |
|
| 查看次数: |
8622 次 |
| 最近记录: |