开发者

Rather than database, how to let datagridview bind an object?

Just wonder how to let datagridview bin开发者_运维问答d to object rather than database? Any example?


From DataGridView.DataSource Property

The DataGridView class supports the standard Windows Forms data-binding model. This means the data source can be of any type that implements one of the following interfaces:

  • The IList interface, including one-dimensional arrays.
  • The IListSource interface, such as the DataTable and DataSet classes.
  • The IBindingList interface, such as the BindingList class.
  • The IBindingListView interface, such as the BindingSource class.


From MSDN (DataGridView.DataSource):

The DataGridView class supports the standard Windows Forms data-binding model. This means the data source can be of any type that implements one of the following interfaces:

  • The IList interface, including one-dimensional arrays.
  • The IListSource interface, such as the DataTable and DataSet classes.
  • The IBindingList interface, such as the BindingList class.
  • The IBindingListView interface, such as the BindingSource class.

For specific examples, see the Example section and the task table at the end of this section.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜