> > Hello All,
> >
[quoted text clipped - 37 lines]
>
> Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
> T.RenderControl(output)
> MyBase.Render(output)
[quoted text clipped - 4 lines]
>
> John Saunders
But if i implement it this way i wont get any events raised by my control
T(or its child controls B), because their viewstate wont be mantained by the
Grid. I think this is a problem many people must've come across but i m not
sure why there is no solution available for it, may be there is a
straightforward way of doin such a think and i m moving in a wrong
direction.
I've been able to identify the cause of my problem; the
PrepareControlHeirarchy() function of the DataGrid (which applies styles on
the control)expects all of the new controls to be added at the end of
controls collection.
I found no solution as yet. Any help would be appreciated
Faizan Ahmed
John Saunders - 29 Dec 2004 14:57 GMT
>> > Hello All,
>> >
[quoted text clipped - 60 lines]
> the control)expects all of the new controls to be added at the end of
> controls collection.
It may be that you will have to stop inheriting from DataGrid and instead
create a composite control which contains both the DataGrid and your Table.
Both the DataGrid and the Table would be in the Controls collection of your
control, thus ViewState will be maintained.
John Saunders