Hi!
I have created a custom control and overrided the OnInit method, but it is never called. I've tried overriding other methods (like OnLoad and OnLoadViewState) and it doesn't work either. The custom control is inside a list property of a user control, and I add it to the user control at the aspx, like the following:
<kcc:HierarchicalFilter runat="server" ID="kccFilterAttakc" FilterSummaryId="kccResumoAttack">
<FilterSteps>
<kcc:HierarchicalFilterStep runat="server" Title="Attakc" Key="ATTAKC" TypeName="FIA.BusinessObjects.ClienteAttakc" SelectMethod="ListByUsuario" ListDataTextField="RAZAO_SOCIAL" ListDataValueField="COD_CLIENTE" UserDefaultParameters="true" >
<NextStep runat="server" Title="RCA" Key="RCA" TypeName="FIA.BusinessObjects.Rca" SelectMethod="List" ListDataTextField="NOME" ListDataValueField="COD_RCA" >
<Parameters>
<kcc:HierarchicalFilterStepParameter runat="server" ParameterType="SelectedValues" />
<kcc:HierarchicalFilterStepParameter runat="server" ParameterType="Fixed" Value="ATTAKCS" Type="String" />
</Parameters>
</NextStep>
</kcc:HierarchicalFilterStep>
</FilterSteps>
</kcc:HierarchicalFilter>
Where HierarchicalFilter is the user control and HierarchicalFilterStep is the custom control (NextStep is a HierarchicalFilterStep too, and its overrided methods of Control are not called either).
When I add the custom control by code at the user control ("this.Controls.Add(new HierarchicalFilterStep()") the methods are callewith no problems.
Any ideas?
Thanks in advance!