extjs表格中的小圖示
參考範例從中取下一段
用在column中
沒啥好說的,都跟範例一樣
{
xtype: 'actioncolumn',
items: [
{
getClass: function(v, meta, eric) { // Or return a class from a function
if (eric.get('change') < 0) {
this.items[0].tooltip = 'Do not buy!';
return 'approved_changes_3';
} else {
this.items[0].tooltip = 'Buy stock';
return 'summary_duetoday_5';
}
},
handler: function(grid, rowIndex, colIndex) {
var eric = store.getAt(rowIndex);
//window.open("http://192.168.3.1/sayhi.html");
//setTimeout("alert('hi'+eric.get('company'));" , 100);
alert('hi '+eric.get('company'));
//alert("Buy " + eric.get('company'));
}
}
]
}
用在column中
沒啥好說的,都跟範例一樣
{
xtype: 'actioncolumn',
items: [
{
getClass: function(v, meta, eric) { // Or return a class from a function
if (eric.get('change') < 0) {
this.items[0].tooltip = 'Do not buy!';
return 'approved_changes_3';
} else {
this.items[0].tooltip = 'Buy stock';
return 'summary_duetoday_5';
}
},
handler: function(grid, rowIndex, colIndex) {
var eric = store.getAt(rowIndex);
//window.open("http://192.168.3.1/sayhi.html");
//setTimeout("alert('hi'+eric.get('company'));" , 100);
alert('hi '+eric.get('company'));
//alert("Buy " + eric.get('company'));
}
}
]
}
留言
張貼留言