111,130
社区成员
发帖
与我相关
我的任务
分享
public void set_DataSource(object value)
{
if (value != this.DataSource)
{
this.CurrentCell = null;
if (this.dataConnection == null)
{
this.dataConnection = new DataGridViewDataConnection(this);
this.dataConnection.SetDataConnection(value, this.DataMember);
}
else
{
if (this.dataConnection.ShouldChangeDataMember(value))
{
this.DataMember = "";
}
this.dataConnection.SetDataConnection(value, this.DataMember);
if (value == null)
{
this.dataConnection = null;
}
}
this.OnDataSourceChanged(EventArgs.Empty);
}
}