ArrayList array = new ArrayList();
array.Add("dd");
array.Add("sss");
dGridMyList.DataSource = null;
dGridMyList.Refresh(); this.dGridMyList.DataSource = array;
this.dGridMyList.Refresh();
这样绑定的效果是ArrayList 里每个元素的长度,即为“2”,“3”,为什么啊?
请高手指点
array.Add("dd");
array.Add("sss");
dGridMyList.DataSource = null;
dGridMyList.Refresh(); this.dGridMyList.DataSource = array;
this.dGridMyList.Refresh();
这样绑定的效果是ArrayList 里每个元素的长度,即为“2”,“3”,为什么啊?
请高手指点
解决方案 »
- 大家帮我看看class是什么意思
- mdi中的子窗体为何不能最大化呢?真是怪了。
- 问一下,有做过音乐网站的吗?
- C#初学者请教一个二重积分的问题
- 请教一个图形算法的问题
- winform中,共用菜单?
- 水晶报表中怎么根据组来加总和列记录号
- 中心点构架是说,程序得所有模块都连接在中心点上,任何一个模块只和中心点有关系,其他不再有任何关系,任何一个模块必须要在中心点上,注册后,可以被中心点托管。
- 在C#中有没有类似VB中的InputBox这样的东东
- ::::::::::C# 好站点收集::::::::: 最好是带论坛的。
- C#编写WEB服务器数据库组件的问题?
- 画拓扑图使用什么软件?我在VISIO里怎么没找到云图?
array.Add("dd");
array.Add("sss");
dGridMyList.DataSource = null;
//dGridMyList.Refresh(); this.dGridMyList.DataSource = array;
this.dGridMyList.DataBind();这种方法貌似可以。。
顺便问一下,Refresh()是干什么用的,看不太懂。
{
public MyString(string s)
{
this.s = s;
} private string s;
public string S
{
get { return s; }
set { s = value; }
}
}ArrayList list = new ArrayList();
list.Add(new MyString("aa"));
list.Add(new MyString("bbbb"));
this.dataGridView1.DataSource = list;