[CLOSED] Multiple UserControls, Column and Tabs

  1. #1

    [CLOSED] Multiple UserControls, Column and Tabs

    Take the following page. With the 2 user controls on the second tab I set the "name" property of ct4 in my page load. This for some unknown reason populates the property of the other control too.

    If the 2 user controls are on tab one then it works fine, also if the usercontrols are removed from the column layout then it works fine also. Any idea why this is happening?

    Edit: It only seems to affect the text box in the usercontrol not the date or time field

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.ct4.Name = "Page Four text ere....."
        Me.ct4.ByDate = Now
      End Sub
    
    <%@ Register src="~\Controls/CopyTo.ascx" tagname="CopyTo" tagprefix="CTO" %>
    
    <ext:FitLayout ID="FitLayout1" runat="server">
      
        <ext:TabPanel ID="TabPanel1" LayoutOnTabChange="true" runat="server" Border="true">
          <Tabs>
            <%-- First Tab --%>
            <ext:Tab ID="TabOne" runat="server" Title="DC41-Use of Force: Page One" Icon="User">
              <Body>
                <ext:FormPanel ID="pnlRight" runat="server" Border="true" Header="false" MonitorPoll="50"
                  MonitorValid="true" StyleSpec="padding:2px">
                  <Body>
                   
                  </Body>
                </ext:FormPanel>
              </Body>
            </ext:Tab>
            <ext:Tab ID="TabTwo" runat="server" Title="DC41-Use of Force: Page Two" Icon="User">
              <Body>
             <ext:ColumnLayout ID="ColumnLayout1" runat="server">
                  
                  
                  <%-- Column --%>
                  <ext:LayoutColumn ColumnWidth=".5">
                   <ext:FormPanel ID="FormPanel1" runat="server" Border="true" Header="false" MonitorPoll="50"
                      MonitorValid="true" StyleSpec="padding:2px">
                      <Body>
                        <ext:FormLayout ID="FormLayout1" runat="server" LabelAlign="Left" LabelWidth="100">
                           
                            <ext:Anchor>
                            <ext:Panel ID="Panel22" Border="false" runat="server">
                              <Body>
                                <CTO:CopyTo runat="server" ID="ct3" />
                              </Body>
                            </ext:Panel>
                          </ext:Anchor>
                          
                          <ext:Anchor>
                            <ext:Panel ID="Panel44" Border="false" runat="server">
                              <Body>
                                <CTO:CopyTo runat="server" ID="ct4" />
                              </Body>
                            </ext:Panel>
                          </ext:Anchor>
                        </ext:FormLayout>
                    </Body>
                    </ext:FormPanel>
                  </ext:LayoutColumn>
                </ext:ColumnLayout>
              </Body>
            </ext:Tab>
           </Tabs>
          
        </ext:TabPanel> 
           
           
      </ext:FitLayout>
    (Control is attached if you need it)

  2. #2

    RE: [CLOSED] Multiple UserControls, Column and Tabs

    Hi,

    1. With the 2 user controls on the second tab I set the "name" property of ct4 in my page load. This for some unknown reason populates the property of the other control too.
    Cannot reproduce it

    2. If
    the 2 user controls are on tab one then it works fine, also if the
    usercontrols are removed from the column layout then it works fine also.

    I am not sure what you mean. Both controls display fine. I don't see any issues. Please provide more details

    Please note that if AjaxMethod is defined in the user control then you cannot call it as 'Coolite.AjaxMethods'. Use the following code
    <ext:TokenScript runat="server">
    <script type="text/javascript">
    
      function DataChanged() {
        #{AjaxMethods}.DataChanged();
      };
    
    </script>
    </ext:TokenScript>
    Here is my test case
    <%@ Page Language="VB" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <%@ Register src="CopyTo.ascx" tagname="CopyTo" tagprefix="CTO" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title></title>
        
        <script runat="server">
            Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
                Me.ct4.Name = "Page Four text ere....."
                Me.ct4.ByDate = Now
            End Sub
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ResourceManager1" runat="server"/>
            
             <ext:TabPanel ID="TabPanel1" LayoutOnTabChange="true" runat="server" Border="true" Height="600">
                  <Tabs>
                    <%-- First Tab --%>
                    <ext:Tab ID="TabOne" runat="server" Title="DC41-Use of Force: Page One" Icon="User">
                      <Body>
                        <ext:FormPanel ID="pnlRight" runat="server" Border="true" Header="false" MonitorPoll="50"
                          MonitorValid="true" StyleSpec="padding:2px" Height="300">
                          <Body>
                           
                          </Body>
                        </ext:FormPanel>
                      </Body>
                    </ext:Tab>
                    <ext:Tab ID="TabTwo" runat="server" Title="DC41-Use of Force: Page Two" Icon="User">
                      <Body>
                     <ext:ColumnLayout ID="ColumnLayout1" runat="server">
                          
                          
                          <%-- Column --%>
                          <ext:LayoutColumn ColumnWidth=".5">
                           <ext:FormPanel ID="FormPanel1" runat="server" Border="true" Header="false" MonitorPoll="50"
                              MonitorValid="true" StyleSpec="padding:2px">
                              <Body>
                                <ext:FormLayout ID="FormLayout1" runat="server" LabelAlign="Left" LabelWidth="100">
                                   
                                    <ext:Anchor>
                                    <ext:Panel ID="Panel22" Border="false" runat="server">
                                      <Body>
                                        <CTO:CopyTo runat="server" ID="ct3" />
                                      </Body>
                                    </ext:Panel>
                                  </ext:Anchor>
                                  
                                  <ext:Anchor>
                                    <ext:Panel ID="Panel44" Border="false" runat="server">
                                      <Body>
                                        <CTO:CopyTo runat="server" ID="ct4" />
                                      </Body>
                                    </ext:Panel>
                                  </ext:Anchor>
                                </ext:FormLayout>
                            </Body>
                            </ext:FormPanel>
                          </ext:LayoutColumn>
                        </ext:ColumnLayout>
                      </Body>
                    </ext:Tab>
                   </Tabs>
                  
                </ext:TabPanel> 
        </form>
    </body>
    </html>
  3. #3

    RE: [CLOSED] Multiple UserControls, Column and Tabs

    I have just copied your testcase directly and run it. It doesnt work correctly as you can see in the attached screen shot.

    I am using version 0.8.2.17899 of coolite in IE7 if that helps

  4. #4

    RE: [CLOSED] Multiple UserControls, Column and Tabs

    Hi,



    What is incorrected on that screenshot? The single incorrect item I see is duplicating text for the text field but it is fixed already, you need to update from SVN
  5. #5

    RE: [CLOSED] Multiple UserControls, Column and Tabs

    The duplicating text is the only incorrect item, I didnt realise you had fixed it I shall get the latest from SVN.

    Many thanks.
  6. #6

    RE: [CLOSED] Multiple UserControls, Column and Tabs

    Hi,

    Please let me know if you still have problems after update

Similar Threads

  1. [CLOSED] Export To Excel with multiple tabs
    By Fahd in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 25, 2012, 2:01 PM
  2. Replies: 7
    Last Post: Oct 28, 2011, 4:25 PM
  3. [CLOSED] Advice for dynamic multiple tabs
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 04, 2011, 10:18 AM
  4. Replies: 7
    Last Post: Mar 09, 2011, 8:15 PM
  5. Open Multiple Tabs with CheckboxSelectionModel
    By simonmicheal in forum 1.x Help
    Replies: 0
    Last Post: May 29, 2009, 12:56 PM

Posting Permissions