【发布时间】:2011-04-05 04:48:41
【问题描述】:
我的 C# 应用程序包含这样的数据对象:
public class Data
{
public class a {get;set;}
public class b {get;set;}
}
public class a
{
public int first {get;set;}
}
public class b
{
public int second{get;set;}
}
我在应用程序启动时初始化我的数据,并且我的数据在应用程序运行时发生变化。
我有一个 dataGridView,我想绑定到 first 属性和 second 属性。 DataGrid 包含两列,绑定到first 和second 属性。
如何进行这种绑定?我不想更改我的数据源,也不想添加数据。
注意:请记住,每次应用运行时我的数据都会发生变化。
【问题讨论】:
标签: c# .net data-binding datagridview binding