1 Attachment(s)
Adding icon in grid column's header
How can i add icon in grid an attach some action to them? For example i need to close columns.
Something like this:
Attachment 29765
One of the possible solution can be:
in column definitions add:
PHP Code:
{
header: '<img src="image.png" onclick="someaction('col1')" /> Price',
dataIndex: 'col1',
id: 'col1',
width: 30
}
but when i move mouse there apear droup down for sorting and columns visible. And i can't position the image in top right corner of the cell
Second one:
PHP Code:
#col1 .x-column-header-inner{
background:url("image.png") no-repeat; !important;
}
but in second example how can i get on which column, user click and catch that in handler?