我想創建一個自定義用戶控件,並且我需要在設計時獲得三個數據源,displaymember和value成員。用三個數據源創建用戶控件,displaymember和valuemember
我可以得到下面的代碼數據源:
private BindingSource dataSource;
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design")]
[Category("Data")]
[RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))]
[DefaultValue(null)]
public BindingSource DataSource
{
get
{
return this.dataSource;
}
set
{
if (this.dataSource != value)
{
this.dataSource = value;
}
}
}
我不知道我必須讓valuemember和displaymember相關數據源
我之前看到它,但不是很有用。 – khoshahmad 2012-02-28 13:08:23
它缺少什麼? – 2012-02-28 14:04:35
我之前評論過它,但它對我沒有用處。請注意它沒有列出數據源,它沒有列出displaymember,我應該輸入displaymemebr,我需要查看相關顯示成員中每個數據源的列的列表。 – khoshahmad 2012-02-28 17:21:47