Posts Tagged ‘column class’

The Icon in the header of the Grid object, part two

June 5th, 2012 No comments

Some time ago I wrote about how it is possible to set the icon in the header of the grid object. On that occasion, to initiate setting up icons in a specific column used ID attribute column. The disadvantage of this approach is that if you have multiple grid objects that have columns that are repeated have to change the value of the ID attribute and therefore you are adding a new style in the CSS.

To overcome this problem, it is necessary to define a CSS style as a class, and then in the definition of the column to use CLS attribute. Example of setting ikoice would be:

.colFlag .x-column-header-inner
    background:transparent url(../../images/icons/famfam/flag_red.png)
    no-repeat 3px 3px !important;

And then when defining attribute of the column grid object set, eg .:

    header:'Naziv kolone',
    tooltip:'Tekst koji se vidi ukoliko se koristi header tooltip plugin',