且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在网格视图中,需要在包含语句的单元格中使单词"bold".

更新时间:2023-11-28 13:48:22

Sure, you just need to include the bold tag to the text.

The below code will set the text in the first rows of the first column to "Hello Ryan", having the word "Ryan" in bold. You just need to put <b> in front of the text you want to be bold and you must put </b> at the end of the text that you want to be bold.

GridView1.Rows[0].Cells[0].Text = "Hello <b>Ryan</b>";