Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
Setting the cell font in a grid
posted

Hi

I created a report with a grid (IGrid) and use a cellPattern for the cell charactaristics however I dont see any font that I can set.

I would like to set a specific font style for the text in the cells. size , boldness etc.

what is the best way to do it . currently what I do is use the IText , but I wonder if there is an option in the cellPattern somehow.

gridCell = gridRow.AddCell();

cellPattern.Apply(gridCell);

IText t = gridCell.AddText();

t.Style.Font = new Font("Arial", 10);

Thanks.

  • 469350
    Offline posted

    I think you have to use an IText. The cell itself doesn't have the ability to show text, it's just a container, so it doesn't make sense for it to have a Font setting. The IText is what displys the text and determines the font.