datagridview 能不能 dictionary做为数据源?

qingtianzhuren 2010-09-27 05:35:04
有无这方面的例子?
...全文
238 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2010-09-27
  • 打赏
  • 举报
回复
DataGridView 的 DataSource 属性是一个 object 类型的,
对象是否实现以下接口:
IList
IListSource
IBindingList
IBindingListView
public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>,
ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>,
IDictionary, ICollection, IEnumerable, ISerializable, IDeserializationCallback
编程爱好者L 2010-09-27
  • 打赏
  • 举报
回复
为什么要用这个dictionary<T,T>说说你的需求,这样只能保存单个值.....
YellowManDog 2010-09-27
  • 打赏
  • 举报
回复
你要是循环赋值的话,很简单

111,125

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧