A
a serr
I'm creating a custom control Inheriting from Table and implementing
INamingContainer that has a button added to a TableCell.
( public class SmartDataTable : Control, INamingContainer
{
protected override void CreateChildControls( )
{
TableCell myCell = new TableCell();
myCell.Controls.Add(myBtn)
this.MyBtn.Click += new
EventHandler(this.OnMyBtn_Click);
TableRow myRow = new TableRow();
myRow.Cells.Add(myCell);
Rows.Add(myRow);
} )
The button posts the form back to the server, but I cannot seem to catch the
event in my CustomTable control.
The other option I have found is to inherit from Control (making a composite
control) but the how do I get my control to have all of the properties of the
Table at the top level?
INamingContainer that has a button added to a TableCell.
( public class SmartDataTable : Control, INamingContainer
{
protected override void CreateChildControls( )
{
TableCell myCell = new TableCell();
myCell.Controls.Add(myBtn)
this.MyBtn.Click += new
EventHandler(this.OnMyBtn_Click);
TableRow myRow = new TableRow();
myRow.Cells.Add(myCell);
Rows.Add(myRow);
} )
The button posts the form back to the server, but I cannot seem to catch the
event in my CustomTable control.
The other option I have found is to inherit from Control (making a composite
control) but the how do I get my control to have all of the properties of the
Table at the top level?