hello,
I have this custom datagrid control, that inherits from DataGrid.
In addition to datagrid, I am adding a "status" table under it, and
another html button, which will trigger a new row.
My problem is that the events associated with the custom button do not
trigger every time.
I am adding my button as private global control inside of override
CreateChildControls(), and than calling _myButton.Render( writer )
inside of override Render( ... ) event.
Here is my code for the button:
_addnewbutton = new Button();
_addnewbutton.Text = "Add New";
_addnewbutton.CssClass = _customGridInputButton;
_addnewbutton.CausesValidation = this.CausesValidation;
_addnewbutton.Click += new EventHandler(_addnewbutton_Click);
note the CausesValidation, and _addnewbutton_Click are not
honored/triggered on first postback, but are working on each
consecutive postback after that :(
I am calling EnsureChildcontrols() inside of override Controls get; and
also tried ensuring it OnLoad event.