Windows窗体(点网)中的数据网格视图帮助 [英] help with data grid view in windows form ( dot net )

查看:57
本文介绍了Windows窗体(点网)中的数据网格视图帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我遇到了一个我从未遇到过的奇怪问题.
我从excel数据库中读取值,并将其直接显示在数据网格中. excel工作表单元格在同一单元格中包含粗体,斜体,删除线和超级脚本文本,但数据网格结果未显示它.它显示纯文本.我无法在单元格级别使用用户字体属性,因为理智的单元格可能包含普通文本以及上面提到的其他类型的文本.

有什么办法可以实现?
请帮助我,因为这个错误,我的整个研究生项目都已停止..

谢谢

Hello,
i m encountering a strange problem which i have never encountered before.
Im reading values from excel database and displaying it directly in data grid as a result. The excel sheet cell contains bold , italics and strike-through and super script text within a same cell , but the data grid result is not showing it. It displays the plain text. I cant user font property at cell level because the sane cell may contain plain as well as different type of text mentioned above.

Is there any way to achieve it ?
Please help me my whole graduate project has stopped becuase of this error..

Thanks

推荐答案

写道:​​

请帮助我,我整个研究生项目已经停止,因为错误..

Please help me my whole graduate project has stopped becuase of this error..



有人会认为您在开始之前会做过一些研究.所有显示文本,显示纯文本的.NET控件,只有富文本控件将使用粗体,斜体等格式显示文本.即使如此,我仍不确定您如何从Excel中获取数据(如果文本与RTF不兼容,则不是数据库,BTW).我认为,如果是这样,那么您收到的额外格式信息将以您曾经提到的方式破坏数据网格.

您的第一步是获取包括格式信息在内的数据.第二步是确保数据与RTF控件兼容.第三种是使用富文本控件显示数据.有其他选择,但都不是漂亮的IMO.



One would think you''d have done some research before you started. All .NET controls that show text, show plain text, only a rich text control will show text using formatting like bold, italics, etc. Even then, I''m not sure how you''re getting data from Excel ( which is NOT a database, BTW ), if the text is compatible with RTF or not. I''d think that if it was, the extra formatting information you''re recieving would be screwing up your data grid in ways that you would have mentioned, if it were so.

your first step is to get the data including the formatting information. Your second is to make sure that data is compatible with the rich text control. Your third is to use rich text controls to show your data. There are alternatives, but none of them are pretty IMO.


这篇关于Windows窗体(点网)中的数据网格视图帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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