[CLOSED] How to reset ascx form from it's container?

  1. #1

    [CLOSED] How to reset ascx form from it's container?

    Hii,

    I want to reset formPanel which is located in ascx file from its container (aspx). I used to call #{panelForm}.getForm().reset() if panelForm is located on the aspx file, but the same call doesn't work when panelForm is located in the aspx file..
    Thx,
    Last edited by geoffrey.mcgill; Jul 26, 2010 at 6:30 AM.
  2. #2
    Hi,

    Any chance to see a test case?
  3. #3
    Here is part of aspx

    <%@ Register Src="~/Dokumen/Perorangan.ascx" TagPrefix="pero" TagName="pero" %>
     
    [...]
     
    <TopBar>
        <ext:Toolbar runat="server" ID="ToolBar1">
              <Items>
                    <ext:Button runat="server" Text="Simpan" ID="btnSimpan" Icon="Disk">
                          <Listener>
                                 <Click Handler="#{panelForm}.getForm().reset()" ></Click> <%--How to reset ascx form from here? --%>
                          </Listener>
                    </ext:Button>
               </Items>
         </ext:Toolbar>
    </TopBar>

    and here is part of ascx:

    <ext:BorderLayout ID="BorderLayout1" runat="server">
        <Center>
            <ext:Panel ID="panelForm" runat="server" BodyBorder="false" Border="false"
                BodyStyle="padding:20px; background-color:#d1dff0">
                <Content>
     
    
                </Content>
            </ext:Panel>
        </Center>
    </ext:BorderLayout>
    Last edited by geoffrey.mcgill; Jul 21, 2010 at 8:48 PM. Reason: please use [code] tags
  4. #4
    Hi dev,

    In your code sample, the "panelForm" is not a form, does not contain a form and contains no Fields, so there is nothing to reset.
    Geoffrey McGill
    Founder

Similar Threads

  1. form.reset() && daterange Error
    By threewonders in forum 1.x Help
    Replies: 1
    Last Post: Mar 28, 2012, 11:28 AM
  2. [CLOSED] Form reset not working
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 22, 2010, 7:01 AM
  3. Question ascx
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Feb 26, 2009, 3:48 PM
  4. Form inside window reset issue
    By sz_146 in forum 1.x Help
    Replies: 0
    Last Post: Feb 03, 2009, 12:50 PM
  5. [CLOSED] Problem with ascx
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Nov 06, 2008, 12:38 PM

Posting Permissions