[CLOSED] Panel with Layout="Card" in v 1.0

  1. #1

    [CLOSED] Panel with Layout="Card" in v 1.0

    Hello,

    I'm having an issue with a Panel with a Layout="Card". We used to have a CardLayout wrap around it and we modified for Coolite v 1.0
    Now I'm getting a JavaScript error and I'm not sure what the problems is.

    The error is;

    "Object doesn't support this property or method"
    When running the application on debug mode (Javascript) it complains on this line

    this.layout.setActiveItem(a)
    Please look at pnlLayout1 Panel control section

    Html

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectRequestForms.aspx.cs"
        Inherits="WebClientTrackerII.App.Projects.RequestForms.ProjectRequestForms" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Register src="DVCWebcast.ascx" tagname="DVCWebcast" tagprefix="uc1" %>
    <%@ Register src="Webchat.ascx" tagname="Webchat" tagprefix="uc1" %>
    <%@ Register src="Podcast.ascx" tagname="Podcast" tagprefix="uc1" %>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <link href="../ProjectsStyle.css" rel="stylesheet" type="text/css" />
        <script language="javascript" type="text/javascript">
       
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
       
        <ext:ResourceManager ID="projectRequestFormsMr" runat="server" Theme="Gray" />
        <ext:Viewport ID="prjctRqstViewport" runat="server">
            <Items>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <Center>
                        <ext:Panel ID="WizardPanel" runat="server"  Header="false" BodyStyle="padding:6px;background-color:#dedede;" AutoScroll="true" Layout="Fit">
                            <TopBar>
                               
                                <ext:Toolbar ID="topbarTlbr" runat="server" >
                                    <Items>
                                        <ext:Label ID="lblView" runat="server" Text="View :"></ext:Label>
                                        <ext:ToolbarSeparator ID="tlbrSeparator1" runat="server"></ext:ToolbarSeparator>
                                        <ext:ComboBox ID="cmbBoxSelect" runat="server" ReadOnly="true" Disabled="true">
                                            <Items>
                                                <ext:ListItem Text="DVC/Webcast Form" Value="DVCWebcast" />
                                                <ext:ListItem Text="Webchat Form" Value="Webchat" />
                                                <ext:ListItem Text="Podcast Form" Value="Podcast" />
                                            </Items>
                                            <DirectEvents>
                                              <Select OnEvent="cmbBoxSelectEvent">
                                                   <ExtraParams>
                                                    <ext:Parameter Name="selectedValue" Value="#{cmbBoxSelect}.getValue()" Mode="Raw" />
                                                </ExtraParams>
                                              </Select>
                                            </DirectEvents>
                                        </ext:ComboBox>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                            <Items>
                                <ext:Panel ID="pnlLayout1" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Card" ActiveIndex="0">
                                <Items>
                                    <ext:Panel ID="Panel1" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Fit">
                                        <Content>
                                        <%--
                                            <uc1:DVCWebcast ID="DVCWebcast1" runat="server" />
                                            --%>
                                        </Content>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel2" runat="server" Border="false" Header="false" AutoScroll="true">
                                        <Content>
                                            <uc1:Webchat ID="Webchat1" runat="server" />
                                        </Content>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel3" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Fit">
                                        <Content>
                                        <%--
                                            <uc1:Podcast ID="Podcast1" runat="server" />
                                             --%>
                                        </Content>
                                    </ext:Panel>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                    </Center>
                </ext:BorderLayout>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Server-Side

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Ext.Net;
    
    
    
    namespace WebClientTrackerII.App.Projects.RequestForms
    {
        public partial class ProjectRequestForms : WebClientTrackerII.App.Projects.ProjectController
        {
            protected void Page_Load(object sender, EventArgs e)
            {
    
    
                if (!IsPostBack)
                {
                    BusinessAccessLayer.Projects.ProjectsBO prjcBO = new BusinessAccessLayer.Projects.ProjectsBO();
                    string trackernumber = Request.QueryString["trackerNumber"];
                    string projectTypeName = string.Empty;
    
    
                    if (!string.IsNullOrEmpty(trackernumber))
                    {
                        projectTypeName = prjcBO.GetProjectTypeName(trackernumber);
                    }
                   
    
    
                    switch (projectTypeName)
                    {
                        case "DVC/Webcast":
                            this.cmbBoxSelect.SelectedItem.Value = "DVCWebcast";
                            this.ChangePanel(0);
                            break;
                        case "Webchat":
                            this.cmbBoxSelect.SelectedItem.Value = "Webchat";
                            ChangePanel(1);
                            break;
                        case "Podcast":
                            this.cmbBoxSelect.SelectedItem.Value = "Podcast";
                            ChangePanel(2);
                            break;
                        default:
                            break;
                    }
    
    
                }
    
    
            }
    
    
            /// <summary>
            ///
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            public void cmbBoxSelectEvent(object sender, DirectEventArgs e)
            {
                string selectedValue = e.ExtraParams["selectedValue"];
    
    
                switch (selectedValue)
                {
                    case "DVC/Webcast":
                        ChangePanel(0);
                        break;
                    case "Webchat":
                        ChangePanel(1);
                        break;
                    case "Podcast":
                        ChangePanel(2);
                        break;
                }
            }
    
    
            protected void ChangePanel(int ActiveIndex)
            {
                WizardPanel.ActiveIndex = ActiveIndex;
            }
           
        }
    }
  2. #2

    RE: [CLOSED] Panel with Layout="Card" in v 1.0

    Hi,

    WizardPanel uses Layout="Fit" therefore setActiveItem is absent. Use pnlLayout1 panel which uses Layout="Card"
    pnlLayout1.ActiveIndex = index;

Similar Threads

  1. Extending a Panel (layout=card)
    By phinoppix in forum 1.x Help
    Replies: 3
    Last Post: Jun 03, 2011, 10:54 AM
  2. [CLOSED] Width of controls within card layout
    By wazige in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 06, 2010, 12:32 PM
  3. set activeindex in card layout
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jun 28, 2010, 10:51 AM
  4. [CLOSED] Card Layout issue
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 01, 2010, 4:43 PM
  5. card layout height
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Nov 04, 2009, 4:11 AM

Posting Permissions