使字符串的一部分变大和粗体 [英] Make some part of a string large and bold
本文介绍了使字符串的一部分变大和粗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Everyone
我遇到问题。我想在页面加载时在网格视图列中绑定一些文本。我希望将此文本的某些部分加粗大和休息是正常的...我怎么做这个例子 -
检查空气压缩机CONDITIO
如果不是/ UNIT FAILS< / pre> <必须安全地安装/ pre>
谢谢解决方案
遗憾的是Gridview单元格的text属性不支持此功能。您可以将整个文本设置为粗体,斜体或颜色..但不是字符串的每个单独字符。
您可以做的是编写自定义用户控件和将其添加到单元格中。那么你应该能够做到这一点。听起来很麻烦,而且......但是我没有看到任何其他方式。
Hello Everyone
I face a problem.I want Bind some text in a grid view column on page load.I want make some part of this text bold and large and rest is normal...How i do this exmple-
CHECK AIR COMPRESSOR CONDITIO Must be securely mounted if not/ UNIT FAILS</pre>
thanks解决方案Unfortunately the text property of Gridview cell does not support this feature. You can set the whole text as bold, Italic or a color .. but not each individual character of the string.
What you could do is write a custom usercontrol and add it to the cell. Then you should be able to do this. Sounds like a hassle, and it is .. but I don't see any other way.
这篇关于使字符串的一部分变大和粗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文