How to create a Deluxe Portal at run time ?

  1. #1

    How to create a Deluxe Portal at run time ?

    Hello every body,

    Can any body help in how can I create a new Portlet at run time
    and add it to the Portal that already exists from design time ?

    Kind Regards..
    Samar Ayesh
  2. #2

    RE: How to create a Deluxe Portal at run time ?

    any body can hep ?
  3. #3

    RE: How to create a Deluxe Portal at run time ?

    in the source code the portal is like this
    <ext:Portal ID="Portal1" runat="server" Title="Portal">
                <Body>
                    <ext:ColumnLayout runat="server">
                        <ext:LayoutColumn ColumnWidth=".33">
                            <ext:PortalColumn runat="server" StyleSpec="padding:10px 0 10px 10px">
                                <Body>
                                    <ext:AnchorLayout runat="server">
                                        <ext:Anchor Horizontal="100%">
                                            <ext:Portlet ID="Portlet1" runat="server" Title="Portlet 1" />
                                        </ext:Anchor>
      
                                        <ext:Anchor Horizontal="100%">
                                            <ext:Portlet ID="Portlet3" runat="server" Title="Portlet 3" />
                                        </ext:Anchor>
                                    </ext:AnchorLayout>
                                </Body>
                            </ext:PortalColumn>
                        </ext:LayoutColumn>
    and I use those lines
     
        <ext:Anchor Horizontal="100%">
    
              <ext:Portlet ID="Portlet1" 
    runat="server" Title="Portlet 1" />
    
         </ext:Anchor>
    to create a new portlet at design time
    but i don't know how to create a portlet at run time ?!
  4. #4

    RE: How to create a Deluxe Portal at run time ?

    Hi SaMarZe,

    Please use the following code:
    
    
    
    private void AddPortLet(Portal portal )
    
    
    {
    
    
    Portlet portlet = new Portlet();
    
    
    portlet.Title = DateTime.Now.ToUniversalTime().ToString();
    
    
    portal.Add(portlet);
    
    
    }
    Reguards,
    T
  5. #5

    RE: How to create a Deluxe Portal at run time ?

    Thank u, but now I want it to be draggable, so I sat portlet.draggable=true
    but an exception occurrs at run time saying that "
    c = portal.items.itemAt(col)
    items = c.items.items (this value is nothing)
  6. #6

    RE: How to create a Deluxe Portal at run time ?

    Portlets are contained in AnchorLayout anchors
    Dim portlet As New Coolite.Ext.Web.Portlet()
    portlet.BodyControl.Add('add yuor user control here')
    Dim an As New Coolite.Ext.Web.Anchor()
    an.Horizontal = "100%"
    an.Items.Add(portlet)
    Now you should be able to add that to the Portal
    portal1.add(an)
    The same procedure can be followed in Ext.Netv1.0
  7. #7

    RE: How to create a Deluxe Portal at run time ?

    A postscript to the last reply:

    in Ext.Net v1.0 within portals, Body has been changed to Content; therefore
    portlet.BodyControls.Add(xxx)
    is now
    portlet.ContentControls.Add(xxx)

Similar Threads

  1. [Razor] Unable to create Portal panel
    By vs.mukesh in forum 2.x Help
    Replies: 2
    Last Post: May 09, 2012, 10:54 AM
  2. Replies: 0
    Last Post: Mar 31, 2012, 9:10 AM
  3. [CLOSED] Portal Deluxe not shows Scroll bar in IE 8.0
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 08, 2011, 3:19 AM
  4. [CLOSED] Create Stateful Portal - Save Position and Collapse of Portlets
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 16, 2008, 7:26 PM
  5. deluxe portal examples improved
    By manelj in forum 1.x Help
    Replies: 0
    Last Post: Oct 19, 2008, 3:47 AM

Posting Permissions