tieties 0 Newbie Poster

Hi so it seems my grid doesnt create the controls inside it, i got the one to create the controls with the HtmlEditFormCreated event, but now my second grid that is inside that grid doenst want to create the controls.

this is the code i use to get the gridview, now i can find pageControl1 but pageControl2 keeps on giving me null value. Can anybody help me with this
vb code

Dim PageControl1 As ASPxPageControl = TryCast(ASPxGridView1.FindEditFormTemplateControl("pageControl1"), ASPxPageControl)
Dim ASPxGridView2 As ASPxGridView = TryCast(PageControl1.FindControl("ASPxGridView2"), ASPxGridView)
Dim PageControl2 As ASPxPageControl = TryCast(ASPxGridView2.FindEditFormTemplateControl("pageControl2"), ASPxPageControl)

asp.net code

 <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1" KeyFieldName="BrokerID" >
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <EditButton Visible="True">
                </EditButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="BrokerID" ReadOnly="True" Visible="False" 
                VisibleIndex="1">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Broker" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
        </Columns>

        <Templates>
            <EditForm>
                <div class="container">
                    <dx:ASPxPageControl runat="server" ID="pageControl1">
                        <TabPages>
                            <dx:TabPage Text="Client Information" Visible="true">
                                <ContentCollection>
                                    <dx:ContentControl ID="ContentControl1" runat="server">
                                        <dx:ASPxGridView ID="ASPxGridView2" runat="server" AutoGenerateColumns="False" 
                                            DataSourceID="SqlDataSource2" KeyFieldName="ClientID" OnBeforePerformDataSelect="GetBrokerID">
                                            <Columns>
                                                <dx:GridViewCommandColumn VisibleIndex="0">
                                                    <EditButton Visible="True">
                                                    </EditButton>
                                                </dx:GridViewCommandColumn>
                                                <dx:GridViewDataTextColumn FieldName="ClientID" ReadOnly="True" Visible="False" 
                                                    VisibleIndex="1">
                                                    <EditFormSettings Visible="False" />
                                   <EditFormSettings Visible="False"></EditFormSettings>
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn FieldName="Firstname" VisibleIndex="2">
                                                </dx:GridViewDataTextColumn>
                                            </Columns>

                                            <Templates>
                                                     <EditForm>
                                                            <div >


                                                            <dx:ASPxPageControl ID="pageControl2" runat="server">
                                                                <TabPages>
                                                                    <dx:TabPage Text="PERSONAL DETAILS" Visible="true">
                                                                        <ContentCollection>
                                                                            <dx:ContentControl ID="ContentControl1" runat="server">
                                                                                <table>
                                                                                <tr>
                                                                                <td>
                                                                                    <strong>PERSONAL PARTICULARS:</strong>
                                                                                </td>
                                                                                </tr>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.