用字符串数据列替换Byte []数据列 [英] Replace Byte[] Data Column With a String Data Column
问题描述
感谢您的关注:)
我正在尝试纠正以下情况:
我有一个DataGridView,它显示来自任意select语句的数据. select语句的数据在DataTable中返回,该数据表被指定为DataGridView的数据源.
当DataColumn返回Byte []类型的数据时,会发生此问题.我想出了如何删除此列,但我认为这不是一个很好的解决方案.
我宁愿在DataColumn中显示一条消息,例如< Binary Data>"给用户,而不是莫名其妙地删除一列数据.
是否可以用String类型的DataColumn替换Byte []类型的DataColumn?
Thanks for looking :)
I have the following situation I''m trying to remedy:
I have a DataGridView, which shows data from an arbitrary select statement. The select statement''s data is returned in a DataTable, which is assigned as the DataSource for the DataGridView.
The problem occurs when a DataColumn returns Byte[] type data. I figured out how to just delete this column, which I don''t consider to be a good solution.
I''d rather show a message in the DataColumn like "<Binary Data>" to the user instead of inexplicably deleting a column of data.
Is there a way of replacing the Byte[] type DataColumn with a String type DataColumn?
Is there a setting I don''t know about in a DataGridView which would do this (like the DefaultNull setting, but for a Byte[] type column)?
推荐答案
某些解决方案在此处中进行了讨论 [
Some solutions discusses here[^] - maybe one of those can help you.
这篇关于用字符串数据列替换Byte []数据列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!