标签:style blog http io color ar for sp 文件
//頁面加載時創建grid
var gdProductStock = Ext.create(‘Ext.grid.Panel‘, {
id: ‘gdProductStock‘,
store: ProductStockStore,
height: ‘600‘,
columnLines: true,
frame: true,
hidden: true,
columns: [
{ xtype: ‘rownumberer‘},
{ header: ITEMID, dataIndex: ‘item_id‘, width: 150, align: ‘center‘ },
{ header: PRODUCTID, dataIndex: ‘product_id‘, width: 150, align: ‘center‘ },
{ header: PRODUCTSTOCK, dataIndex: ‘item_stock‘, width: 150, align: ‘center‘ },
{ header: PRODUCTALARM, dataIndex: ‘item_alarm‘, width: 150, align: ‘center‘ }
],
listeners: {
scrollershow: function (scroller) {
if (scroller && scroller.scrollEl) {
scroller.clearManagedListeners();
scroller.mon(scroller.scrollEl, ‘scroll‘, scroller.onElScroll, scroller);
}
}
},
viewConfig: {
forceFit: true,
getRowClass: function (record, rowIndex, rowParams, store) {
if (record.data.type == "1") {
return ‘product_stock_type‘;//注意这里返回的是定义好的css类;列如:(.ppp_ddd_sss div{background-color:red})定义到你页面访问到的css文件里。
}
}
}
});
标签:style blog http io color ar for sp 文件
原文地址:http://www.cnblogs.com/wzj-520j/p/4063013.html