PDA

View Full Version : autoEI render is incorrect



alexaung
16 Aug 2010, 2:30 AM
Hi All,

here is my DIV for header panel (North Panel). If I put it directly in my aspx's body, it is working fine. But I have to put it all of my aspx pages. I am using border layout and want to put those div and control in North Container on the fly. I put it in container's autoEI but render is incorrect. Pls take a look attach image and code. Do you have any idea how to do in ExtJS. Thanks.


<div class="header">21965
<div class="logo"></div>
<div style="float: right; vertical-align: top; font-size: 15px; color: White; display: inline; margin-right: 50px; min-width: 200px;">
<asp:Label ID="LabelUser" runat="server">Lynch Andrew, Fleet Technical Services Manager</asp:Label>
</div>
<div id="divSearch" style="float: right; position: relative; top: 16px; right: -250px; font-size:15px; color: White; display: inline;">
<asp:LinkButton ID="LinkButton1" OnClientClick="loginHandler()" runat="server">Logout</asp:LinkButton> |
<select id="SelectThemes" style="width:200px;">
<option>Access</option>
<option>Gray</option>
</select>
</div>
</div>





.header
{
height: 45px;
overflow:hidden;
background-color: transparent;
background-repeat: repeat-x repeat-y;
background: url(../../Images/EMP/bg.jpg);
}

.logo
{
background-color: transparent;
background-repeat: no-repeat !important;
width: 260px;
height: 45px;
float: left;
margin-left:30px;
background: url(../../Images/EMP/ORBISLogo.png);
}



config = {
region: 'north',
layout: 'column',
margins: '0 0 0 0',
height: 40,
width: 1024,
items: [{
xtype: 'box',
autoEl: { tag: 'div', html: Ext.Orbis.headerHTML }
}]
};

alexaung
16 Aug 2010, 2:32 AM
21966

Condor
16 Aug 2010, 3:01 AM
Your HTML contains dynamic asp code, so you can't copy the HTML text and expect to get the same result.

You should be using:

layout: 'anchor', // why did you choose 'column'?
items: {
anchor: '0',
xtype: 'box',
el: Ext.getDom('divSearch').parentNode
}
or maybe even:

contentEl: Ext.getDom('divSearch').parentNode

alexaung
18 Aug 2010, 3:46 AM
I have to put stype in here. Problem solved

autoEl: { tag: 'div', style: 'width:100%;', html: Ext.Orbis.headerHTML }