.net - Formatted text inside cell on datagridview -


how can display text value of cell format in datagridview?

by example, mi text value displayed this:

date: 05/12/2015
user: username
weight: 5.0

but need in same cell:

date: 05/12/2015
user: username
weight: 5.0

maybe labels inside cell?

thanks!

you can do:

grid.columns("concept").defaultcellstyle.font = new font(grid.font, fontstyle.bold) 

where "grid" control datagridview, "concept" columname. if want use colour:

 grid.columns("concepto").defaultcellstyle.forecolor = color.maroon 

if want change row's default style:

grid.rows(7).defaultcellstyle.backcolor = color.whitesmoke grid.rows(7).defaultcellstyle.font = new font(grid.font, fontstyle.bold) grid.rows(7).defaultcellstyle.forecolor = color.darkslategray 

or can change cell's format:

grid.rows(7).cells("concept").style.backcolor = color.aliceblue 

you can see msdn - example.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -