#if NET_2_0
using System.Collections;
+using System.ComponentModel;
namespace System.Web.UI.WebControls
{
+ [DesignerAttribute ("System.Web.UI.Design.WebControls.HierarchicalDataBoundControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public abstract class HierarchicalDataBoundControl : BaseDataBoundControl
{
+ [IDReferencePropertyAttribute (typeof(HierarchicalDataSourceControl))]
public override string DataSourceID {
get {
object o = ViewState ["DataSourceID"];
}
}
- protected HierarchicalDataSourceView GetData (string viewPath)
+ protected virtual HierarchicalDataSourceView GetData (string viewPath)
{
if (DataSource != null && DataSourceID != "")
throw new HttpException ();
return null;
}
- protected IHierarchicalDataSource GetDataSource ()
+ protected virtual IHierarchicalDataSource GetDataSource ()
{
if (DataSourceID != "")
return NamingContainer.FindControl (DataSourceID) as IHierarchicalDataSource;
return DataSource as IHierarchicalDataSource;
}
+
+ [MonoTODO]
+ protected void MarkAsDataBound ()
+ {
+ throw new NotImplementedException ();
+ }
protected override void OnDataPropertyChanged ()
{
RequiresDataBinding = true;
}
- protected override void OnLoad (EventArgs e)
+ protected internal override void OnLoad (EventArgs e)
{
+ if (IsBoundUsingDataSourceID && (!Page.IsPostBack || !EnableViewState))
+ RequiresDataBinding = true;
+
IHierarchicalDataSource ds = GetDataSource ();
if (ds != null && DataSourceID != "")
ds.DataSourceChanged += new EventHandler (OnDataSourceChanged);
protected internal virtual void PerformDataBinding ()
{
- OnDataBinding (EventArgs.Empty);
}
protected override void PerformSelect ()
{
+ OnDataBinding (EventArgs.Empty);
PerformDataBinding ();
+ OnDataBound (EventArgs.Empty);
}
protected override void ValidateDataSource (object dataSource)