InventoryGrid = new Ext.grid.GridPanel({
id: "InventoryGrid",
store: InventoryStore,
sm: sm,
cm: cm,
loadMask: true,
autoScroll: true,
stripeRows: true, //采取grid自动渲染,行列交错!
columnLines: true,
border: false,
viewConfig: {
//forceFit: true,
columnsText: "显示/隐藏列",
sortAscText: "正序排列",
sortDescText: "倒序排列",
/*根据条件改变要求行的背景色!
需要在主页面新建一个css例如:
<style type="text/css">
.my_row_style table{ background:Yellow}
</style>
然后用下面的方法便可以实现了!见API实例
*/
getRowClass: function (record, rowIndex, rowParams, store) {
if (record.data.DayStore <= "50") {
return "my_row_style";
}
}
},
id: "InventoryGrid",
store: InventoryStore,
sm: sm,
cm: cm,
loadMask: true,
autoScroll: true,
stripeRows: true, //采取grid自动渲染,行列交错!
columnLines: true,
border: false,
viewConfig: {
//forceFit: true,
columnsText: "显示/隐藏列",
sortAscText: "正序排列",
sortDescText: "倒序排列",
/*根据条件改变要求行的背景色!
需要在主页面新建一个css例如:
<style type="text/css">
.my_row_style table{ background:Yellow}
</style>
然后用下面的方法便可以实现了!见API实例
*/
getRowClass: function (record, rowIndex, rowParams, store) {
if (record.data.DayStore <= "50") {
return "my_row_style";
}
}
},
库存网格动态展示与条件渲染
本文介绍如何使用 ExtJS 库创建动态库存网格,并实现条件背景色渲染,包括库存状态与显示/隐藏列功能。
468

被折叠的 条评论
为什么被折叠?



