Hi,
I have a text in one cell, but part of the text need to be bold, other part regular. For example: " text_bold text_regular"
I know how to change the font of a whole cell in a DataGridView, but does anyone know how can be changed the font (bold - regular) for text in one cell?
10x, Peter
Multiple fonts in one DataGridView cell ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

CrishRank #1,487 · 1.1K reputationPosted May 23, 2010, 8:04 PM EDT
if you are taking label in DataGridView then applay different different style in every labels.
Thanks
Peter3 reputationPosted May 24, 2010, 6:48 AM EDT
I set DataGridView cell value like this:
grid[cellPosition.Row, cellPosition.Column].Value = "this is a cell value";
I set DataGridView cell font like this:
grid[cellPosition.Row, cellPosition.Column].View.Font = new Font(grid.Font, FontStyle.Bold);
So, the question is, in the above example, how can I set "this is a" part of the cell value to bold, and the rest of the cell value ("cell value" in the above example) to normal font, not bold. If I set the font as shown above, the whole cell value is set to bold.