突出显示DataGridView中的单词? [英] Highlighting a word in a DataGridView?

查看:128
本文介绍了突出显示DataGridView中的单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的C#3.5 Windows窗体应用程序中,我有一个网格(DataGridView)。我想在某个单元格内突出显示一个单词,但网格只允许我突出显示整个单元格。



网格或任何可用的用户控件是否有任何调整,建立在DataGridView上,可以突出显示DataGridView单元格内的单个单词?

解决方案

解决方案是使用您的 DataGridView 中的RichTextBox 列。然后,您将能够突出显示单个单词,并且可以完全控制单元格中的格式。看看这篇文章:



DataGridView中的RichTextBox列


In my C# 3.5 Windows Forms application I have a grid (DataGridView). I would like to highlight a word inside some cell, but the grid only allows me to highlight the whole cell.

Is there any tweaks for the grid or any available usercontrol, built on DataGridView, which can highlight a single word inside DataGridView cell?

解决方案

The solution would be to use a RichTextBox column in your DataGridView. Then you would be able to highlight a single word as well as have complete control over the formatting in the cell. Take a look at this article:

RichTextBox column in DataGridView

这篇关于突出显示DataGridView中的单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆