ZIndex problem in RadWindow

4 posts, 0 answers
  1. TaponiaSoftware
    TaponiaSoftware avatar
    11 posts
    Member since:
    Jul 2013

    Posted 27 Sep 2013 Link to this post

    hi,

    the dropdown-div of RadDropDownTree is captured within an RadWindow.
    Is there a way to show the dropdown window over the borders of a RadWindow? (ZIndex)

    Thank you

    Stefan
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Sep 2013 Link to this post

    Hi Stefan,

    I guess you want to show the RadDropDownTree's drop-down over the RadWindow border which is the default behavior. Please check the sample code I tried.

    ASPX:
    <telerik:RadWindow ID="RadWindow1" runat="server" OpenerElementID="RadButton1" Width="400px"
        Height="300px">
        <ContentTemplate>
            <div style="padding: 10px 10px 10px 15px;">
                <telerik:RadDropDownTree ID="RadDropDownTree1" runat="server" Width="300px" DefaultMessage="Select a product from the list">
                </telerik:RadDropDownTree>
            </div>
        </ContentTemplate>
    </telerik:RadWindow>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Open RadWindow">
    </telerik:RadButton>

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindToIEnumerable(RadDropDownTree1);
        }
    }
     
    private static void BindToIEnumerable(RadDropDownTree dropdowntree)
    {
        List<SiteDataItem> siteData = new List<SiteDataItem>();
     
        siteData.Add(new SiteDataItem(1, 0, "Products", "Value 0"));
        siteData.Add(new SiteDataItem(2, 1, "RadControls for ASP.NET Ajax", "Value 1"));
        siteData.Add(new SiteDataItem(3, 1, "RadControls for Silverlight", "Value 2"));
        siteData.Add(new SiteDataItem(4, 2, "RadGrid", "Value 3"));
        siteData.Add(new SiteDataItem(5, 2, "RadScheduler", "Value 4"));
        siteData.Add(new SiteDataItem(6, 2, "RadEditor", "Value 5"));
        siteData.Add(new SiteDataItem(7, 2, "RadWindow", "Value 3"));
        siteData.Add(new SiteDataItem(8, 2, "RadButton", "Value 4"));
        siteData.Add(new SiteDataItem(9, 2, "RadComboBox", "Value 5"));
        siteData.Add(new SiteDataItem(7, 3, "RadGrid", "Value 6"));
        siteData.Add(new SiteDataItem(8, 3, "RadMenu", "Value 7"));
        siteData.Add(new SiteDataItem(9, 3, "RadEditor", "Value 8"));
     
        dropdowntree.DataTextField = "Text";
        dropdowntree.DataValueField = "Value";
        dropdowntree.DataFieldID = "ID";
        dropdowntree.DataFieldParentID = "ParentID";
        dropdowntree.DataSource = siteData;
        dropdowntree.DataBind();
    }
     
    internal class SiteDataItem
    {
        private string _text;
        private string _value;
        private int _id;
        private int _parentId;
     
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }
     
        public string Value
        {
            get { return _value; }
            set { _value = value; }
        }
     
        public int ID
        {
            get { return _id; }
            set { _id = value; }
        }
     
        public int ParentID
        {
            get { return _parentId; }
            set { _parentId = value; }
        }
     
        public SiteDataItem(int id, int parentId, string text, string value)
        {
            _id = id;
            _parentId = parentId;
            _text = text;
            _value = value;
        }
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TaponiaSoftware
    TaponiaSoftware avatar
    11 posts
    Member since:
    Jul 2013

    Posted 02 Oct 2013 Link to this post

    Hm, i´m using separate pages within the RadWindow (NavigateUrl) - .

    Seems there is no chance to get a div outside the iframe working (?)
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 07 Oct 2013 Link to this post

    Hello Stefan,

    Unfortunately the contents of an iframe cannot be displayed outside of the iframe as explained in more details here.

    Regards,
    Kate
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top