1
A
回答
2
我做这恰好适合于以下拨弄你的要求。检查的例子。 Running Example
Ext.onReady(function(){
var store = Ext.create('Ext.data.ArrayStore', {
fields: [ 'price', 'change','location'],
data: [
[ 0, 0,'x'],
[ 2, 3,'y'],
[ 0, 1,'z'],
[ 2, 3,'p'],
[ 5, 6,'q'],
[ 0,0,'s']
]
});
var grid = Ext.create('Ext.grid.Panel', {
title: 'Array Grid',
store: store,
cls:'custom-grid',
listeners:{
cellclick:function(thiss, td, cellIndex, record, tr, rowIndex, e, eOpts){
//Removing previous selected column highlighted color
var gridCoulumnlength=grid.columns.length;
for(var i=0;i<gridCoulumnlength;i++){
if(grid.columns[i].tdCls=="custom-column")
grid.columns[i].tdCls="";
}
// adding color to columns
grid.columns[cellIndex].tdCls="custom-column";
grid.getView().refresh();
}
},
columns: [
{text: 'Price', width: 75, dataIndex: 'price'},
{text: 'Change', width: 75, dataIndex: 'change'},
{text: 'Location', width: 75, dataIndex: 'location'}
],
height: 200,
width: 200,
renderTo: Ext.getBody()
});
});
CSS:
.custom-grid .x-grid-row-selected .x-grid-cell {
background-color: #ff0 !important;
border-bottom-color: #999;
border-bottom-style: solid;
border-top-color: #999;
border-top-style: solid;
}
.x-grid-row .custom-column {
background-color: #ecf;
color: #090;
font-weight: bold;
}
相关问题
- 1. Ext js突出显示文本
- 2. 如何隐藏和显示ext js 4.2中的网格面板行?
- 3. EXTJS4 Gridpanel-如何聚焦/突出显示某一行?
- 4. 如何在煎茶的Ext JS 4.2
- 5. 当在Ext JS中单击图表时,在图表中保持突出显示仍然突出显示?
- 6. Ext JS 4.2引擎
- 7. 在GVIM中,我们如何搜索和突出显示,同时保持以前的搜索突出显示
- 8. 如何在Ext JS的弹出窗口中显示Ext.FormPanel?
- 9. 突出显示和取消突出显示行上点击行排列
- 10. 如何在Excel中突出显示行和列
- 11. Coolite EXT的GridPanel
- 12. 在我的Gridpanel上只显示10行
- 13. 突出显示列表行
- 14. 为了让Ext GridPanel在Ext窗口中可以调整大小的Ext Js
- 15. Silverlight Grid突出显示行和列
- 16. WPF Datagrid突出显示行和列
- 17. 多行工具栏Ext JS 4.2
- 18. Ext js 4.2销毁组件
- 19. 如何突出显示我的文字
- 20. 我如何获得分页工具栏中的检查行数Ext js 4.2?
- 21. TextWrangler和行突出显示
- 22. Ext JS的EditorGridPanel - 如何拆分单元格中显示多行
- 23. 如何显示突出显示的MS-Access列表框行?
- 24. 显示/隐藏在Ext JS的一系列单行元件4
- 25. jquery突出显示和不突出显示表行
- 26. 如何在Ext JS 4.2(Sencha Architect)中的事件中运行控制器方法
- 27. 网格显示在Ext JS中
- 28. Ext JS - 多行显示字段
- 29. 错误而出口的GridPanel(EXT)到Excel
- 30. Ext JS 4.2:如何在网格中禁用折叠分组