protected internal override void PluginAdded()
{
base.PluginAdded();
GridPanel grid = this.PluginOwner as GridPanel;
if (grid == null)
{
throw new InvalidOperationException("The RowExpander plugin can only be added to the GridPanel Control or a Control which inherits from GridPanel.");
}
if (!this.PluginOwner.Controls.Contains(this.Template))
{
this.PluginOwner.Controls.Add(this.Template);
}
if (!this.PluginOwner.LazyItems.Contains(this.Template))
{
this.PluginOwner.LazyItems.Add(this.Template);
}
if (this.Component.Count > 0)
{
if (!this.PluginOwner.Controls.Contains(this.Component[0]))
{
this.PluginOwner.Controls.Add(this.Component[0]);
}
if (!this.PluginOwner.LazyItems.Contains(this.Component[0]))
{
this.PluginOwner.LazyItems.Add(this.Component[0]);
}
}
if(this.Page == null)
{
this.Init += new EventHandler(RowExpander_Init);
return;
}
this.InitRowExpanderColumn(grid);
}