G
Guest
I want to add a DataSource property to my control that, at design time, will allow the designer to drop down a list of valid datasource components just like the DataGrid control. The type on the DataSource property is just 'object', so I know it isn't that. Is there a special designer attribute I have to use on my property
Actually my Control has a Combobox and i just want to enable the combobox's (DataSource, DisplayMember, ValueMember) properties
If I map the properties 1to1 like this
[Category("Data"), DefaultValue(null), Description("The datasource that is used to populate the list with items.")
public object DataSourc
get{return this.comboBox.DataSource;
set{this.comboBox.DataSource = value;
[DefaultValue(""), Description("Gets or sets the column for display."), Category("Data")
public string DisplayMembe
get{return this.comboBox.DisplayMember;
set{this.comboBox.DisplayMember = value;
[DefaultValue(""), Description("Gets or sets the column for value."), Category("Data")
public string ValueMembe
get{return this.comboBox.ValueMember;
set{this.comboBox.ValueMember = value;
It breakes the Designers ability to show a dropdown list of avaiable DataSource's.
Actually my Control has a Combobox and i just want to enable the combobox's (DataSource, DisplayMember, ValueMember) properties
If I map the properties 1to1 like this
[Category("Data"), DefaultValue(null), Description("The datasource that is used to populate the list with items.")
public object DataSourc
get{return this.comboBox.DataSource;
set{this.comboBox.DataSource = value;
[DefaultValue(""), Description("Gets or sets the column for display."), Category("Data")
public string DisplayMembe
get{return this.comboBox.DisplayMember;
set{this.comboBox.DisplayMember = value;
[DefaultValue(""), Description("Gets or sets the column for value."), Category("Data")
public string ValueMembe
get{return this.comboBox.ValueMember;
set{this.comboBox.ValueMember = value;
It breakes the Designers ability to show a dropdown list of avaiable DataSource's.