gpt4 book ai didi

c# - BindingSource 参数

转载 作者:行者123 更新时间:2023-11-30 17:04:34 24 4
gpt4 key购买 nike

绑定(bind)源代码:

Component.DataSource = new BindingSource(yourSource, ????);

我看到的所有示例都遵循这种模式,而不是 ????,我总是看到 null。文档说参数是数据源和数据成员,但我不明白数据成员的用途是什么,如何使用它。

最佳答案

DataMember 参数在源包含多个列、列表或数据表并且您需要指定正在使用的数据时使用。来自MSDN for the DataMember Property :

If the DataSource contains multiple lists (or tables) of data, you should set the DataMember property to the name of one of the sources.

您所询问的构造函数仅允许您在实例化时指定此属性。

关于c# - BindingSource 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17367867/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com