テレリックRadGridコントロールを拡張して、オプションのCustomSearchControlを提供します。
protected override void CreateChildControls()
{
this.Controls.Add(CustomSearchControl);
base.CreateChildControls();
this.Controls.Add(CustomSearchControl);
}
最初のCustomSearchControlが消えるため、base.CreateChildControls()には明確なコントロール呼び出しが必要なようです。
代わりにこれを試しました:
protected override void CreateChildControls()
{
base.CreateChildControls();
this.Controls.AddAt(0,CustomSearchControl);
this.Controls.Add(CustomSearchControl);
}
ただし、どちらのコントロールもビューステートに追加されておらず、挿入によってコントロールコレクションの階層が壊れているため、ビューステートエラーが発生します。