Access an owner from inside of the control

  1. #1

    Access an owner from inside of the control

    Page
    <%@ Register Src="~/App/PropertyViewer/ucPropertyViewer.ascx" TagName="PropsViewer"
    	TagPrefix="uc" %>
    ...
    <ext:Panel runat="server" ID="pnlUC" Region="South" Split="True" MinHeight="0">
    	<Content>
    		<uc:PropsViewer runat="server" ID="PropsViewer"></uc:PropsViewer>
    	</Content>
    </ext:Panel>
    ucPropertyViewer.ascx
    <ext:TabPanel runat="server" ID="tpProperties" Border="false" TabPosition="Bottom" EnableTabScroll="true" LayoutOnTabChange="true" Layout="Fit">
    ...
    </ext:TabPanel>
    How can I get control's owner from tpProperties in universal way? This control can be included in different pages inside of different elements, and I need to get, for example, owner's height. In Ext.1 tpProperties.ownerCt worked fine, but in version 2 not the same.
  2. #2
    OK, the problem is more complex.
    I test 2 different pages. In first, more complex, this not works (tpProperties not have "ownerCt" property in general), but in second everything works fine.
    How can I find, what is wrong?
    By the way, at this complex page not fires doLayout after load (resulting representation is broken until I manually call doLayout of container or resize browser window).
    What are ways to locate and fix these problems? Should I post whole page markup to get some help?
  3. #3
    ownerCt problem fixed by adding Layout to control's container.

Similar Threads

  1. Replies: 2
    Last Post: Jan 09, 2013, 12:52 AM
  2. Replies: 8
    Last Post: Jun 24, 2010, 9:39 PM
  3. Replies: 1
    Last Post: Mar 09, 2010, 2:55 AM
  4. Replies: 2
    Last Post: Aug 27, 2009, 8:12 AM
  5. Delegating control's event to the owner page
    By gokcemutlu in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 20, 2009, 1:08 PM

Tags for this Thread

Posting Permissions