Hi,
thank you for letting us know about this issue. It is a bug in the documentation. The correct data source control should contain:
/// <summary>
/// Gets the data source
/// </summary>
public override object DataSource
{
// replace your content with this
get
{
return mDataSource ?? (mDataSource = this.GetDataSource());
}
set
{
this.mDataSource = (DataSet)value;
}
}
and
/// <summary>
/// Gets the datasource data
/// </summary>
protected override object GetDataSourceFromDB()
{
// remove check for null
// Initialize properties with dependence on filter settings
if (SourceFilterControl != null)
{
SourceFilterControl.InitDataProperties(this);
}
// Load data, in this example nothing is loaded
base.DataSource = UserInfoProvider.GetFullUsers(this.WhereCondition, this.OrderBy);
return base.DataSource;
}
The original version of control creates a cycle and the application pool crashed.
With this change the control should work correctly.
Best regards,
Ivana Tomanickova