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
Loading
PeterPosted May 24, 2010, 10:48 AM
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.
CrishPosted May 24, 2010, 12:04 AM
if you are taking label in DataGridView then applay different different style in every labels.
Thanks