PDA

View Full Version : Column-style in a grid panel



vicvolk87
1 Jun 2013, 4:31 AM
Hi, guys! Please, share your knowledge on this issue. I have a simple grid panel and I want one of my columns to have a style like that of a checkbox column, I mean it should have a greyish gradient background color and it should be highlighted in the same way. I invastigated styles by Opera Dragounfly and found x-grid-cell-special style wich is responsible for that background. But the problem is that when I hit the cell it doesn't change it's color to the blue one, like all the other cells do. If you know how to handle this problem, please share.

44134

As you can see on this image, the cell doesn't change it's color when we hit it.

Thank you!

vicvolk87
2 Jun 2013, 1:27 AM
Played hours with "removeRowCls" and "addRowCls" methods within "select" and "deselect" listeners of Ext.selection.RowModel, but to no avail. Such construct as grid.getView().addRowCls(0,'newclass') doesn't throw any error, but has no effect on the first row. Unfortunatelly, there is no even the simplest officical example with "removeRowCls" and "addRowCls" methods.

vicvolk87
2 Jun 2013, 1:35 AM
By the way, I use RowModel, because in my example there is only one column in a grid. And that very column has a gradient-looking style. I set that style like this


viewConfig:{
getRowClass:function(record, rowIndex, rowParams, store){
return "gradient-row";
}
}


But how to highlight it in a standard way (I mean to make it have blue background on select event) - this is beyond my knowledge.

vicvolk87
2 Jun 2013, 9:29 AM
Solved the problem thanks to Skirtle's blog.