I didn't mean to wait a week, but, I am back.  I have installed and looked at many different ways to blog.  W.Bloggar, and SharpReader have been installed and I have had some fun using them.  I still have not gotten comfortable with Bloggar, but I am sure I will.

I have been reading the book Developing Microsoft ASP.NET Server Controls and Components and it has been very good.  I was able to help a colleague out with some of the information on building Composite Controls, and I thought I would blog it.

The concept was about using a Server Control that had a DataGrid control, and whenever I think about a DataGrid, I cannot help but think about DataGridGirl :-).

So this embedded DataGrid was not showing the sorting links in the header and was being created or at least DataBinding was being done in the Render of the new Control.  So in the book, it illustrates that when creating composite controls, if you create, or in this case bind the data in the CreateChildControls overidden method/event, and then called EnsureChildControls() before accessing properties of the DataGrid, then you would have access to all the events, etc. that the DataGrid contained.

Then in the Render of the Control, wherever you wanted the DataGrid Control to appear, you would use the DataGrid.RenderControl(output) statement to put the DataGrid there.

That is it in a nutshell, and what a lifesaver and teaching moment that was when I finally understood how to create a custom control (even a Composite Control) and have other controls inside that you wanted to render in a certain place.