M
mzwilli
Hi, I'm trying to create browsable DataSource and DataMember
properties on a user control.
The idea is to create a descendent object, place a dataset then
specify the DataSource (DataSet) and DataMember (DataTable) by
browsing the controls properties.
I am close, but somtimes get an error when bad values get put into the
DataMember property.
Pretty sure I'm missing something. Can anybody help? Thanks!
Here's what I have so far:
/// <summary>
/// The DataSet used as the Master row set.
/// </summary>
[Browsable(true)]
[Category("Data")]
[Description("The DataSet used for this Child row set.")]
public System.Data.DataSet DataSource
{
get
{
return _DataSource;
}
set
{
_DataSource = value;
}
}
/// <summary>
/// The Table in the DataSet used for this Child row set.
/// </summary>
[Browsable(true)]
[Category("Data")]
[Description("The Table in the DataSet used for this Child row
set.")]
public System.Data.DataTable DataMember
{
get
{
return _DataMember;
}
set
{
_DataMember = value;
}
}
properties on a user control.
The idea is to create a descendent object, place a dataset then
specify the DataSource (DataSet) and DataMember (DataTable) by
browsing the controls properties.
I am close, but somtimes get an error when bad values get put into the
DataMember property.
Pretty sure I'm missing something. Can anybody help? Thanks!
Here's what I have so far:
/// <summary>
/// The DataSet used as the Master row set.
/// </summary>
[Browsable(true)]
[Category("Data")]
[Description("The DataSet used for this Child row set.")]
public System.Data.DataSet DataSource
{
get
{
return _DataSource;
}
set
{
_DataSource = value;
}
}
/// <summary>
/// The Table in the DataSet used for this Child row set.
/// </summary>
[Browsable(true)]
[Category("Data")]
[Description("The Table in the DataSet used for this Child row
set.")]
public System.Data.DataTable DataMember
{
get
{
return _DataMember;
}
set
{
_DataMember = value;
}
}