PDA

View Full Version : To change the font-size and font-weight of particular cells in a grid



Prachi Sinha
18 Apr 2013, 10:51 PM
Hi,
I am using Ext.grid.Panel in my application,

As per requirement I need to change the font-size and font-weight of particular cells of the grid. ie
I want : characters of one row in Bold and in font A
characters of two rows in Bold and in font B
characters of rest of the rows in Normal and in font C

Please find below the attached document for the reference.

43232

Thanks in advance.:)

evant
18 Apr 2013, 10:59 PM
Use a column renderer, you can conditionally add extra markup where necessary:



{
dataIndex: 'foo',
text: 'Foo',
renderer: function(v) {
if (v === 'Bar') {
v = '<span class="baz">' + v + '</span>';
}
return v;
}
}

Prachi Sinha
21 Apr 2013, 10:41 PM
Hi,

Thanks a lot for quick reply.
But can you please elaborate a bit more on this, may be with an example.
I had made a class which made the font weight bold, but it is not taking the font size.