首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

为什么listbox绑定后显示的都是System.Data.DataRowView,该如何处理

2012-05-13 
为什么listbox绑定后显示的都是System.Data.DataRowViewlistbox绑定DataTable后,有时listBox里面每行显示

为什么listbox绑定后显示的都是System.Data.DataRowView
listbox绑定DataTable后,有时listBox里面每行显示的都是“System.Data.DataRowView”,
其它的控件我都是这样绑定的,为什么只有listBox会这样呢,listBox到底该怎么绑定
数据才好,请大家帮忙指点。。。

[解决办法]

C# code
            listBox1.DataSource = ds.Tables["stuff"];            listBox1.DisplayMember = "StaName"; 

热点排行