Error from Dynamically Adding RadWindows to

2 posts, 0 answers
  1. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 18 Dec 2007 Link to this post

    Hi, to add dynamically RadWindow for each link button wihtin a row of RadGrid, I implement following code:

     if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                LinkButton btn = (LinkButton)(item["DisplayName"].FindControl("DisplayNameLinkBtn"));
                // Dynamically creating a RadWindow
                RadWindow window = new RadWindow();
                window.ID = "RadWindow_" + item.ItemIndex;
                RadWindowHolder.Controls.Add(window);
                window.OpenerElementId = btn.ClientID;
                window.OffsetElementId = btn.ClientID;
                window.Width = Unit.Pixel(500);
                window.Height = Unit.Pixel(400);
                // Generate Nevigation URL
                StringBuilder windowUrlSB = new StringBuilder(50);
                windowUrlSB.Append("http://");
                windowUrlSB.Append(Request.Url.Host + Request.ApplicationPath);
                windowUrlSB.Append("/DesktopModules/iBossWatchList/JobSeekerDetail.aspx?AliasID=");
                windowUrlSB.Append(item["AliasID"].Text);
                window.NavigateUrl = windowUrlSB.ToString();

    However, this will cause client-side javascript error: requiring object (translated form my native language) and VS debugger stops here:

    <body>
    ...
    ...
    <script type='text/javascript'>/*<![CDATA[*/
    RadWindowInitialize( "dnn_ctr514_ViewiBossWatchList_RadWindow_0", "RadWindow_0", "radWindow_dnn_ctr514_ViewiBossWatchList_RadWindow_0", false, "
    http://localhost/DNN_iWork_Dev/DesktopModules/iBossWatchList/JobSeekerDetail.aspx?AliasID=1", "", "", "", "", "", "500px", "400px",
    "", "" ,"", "", 0, 127, 1, null, null, null, null, "dnn_ctr514_ViewiBossWatchList_WatchListGrid_ctl01_ctl04_DisplayNameLinkBtn", "dnn_ctr514_ViewiBossWatchList_WatchListGrid_ctl01_ctl04_DisplayNameLinkBtn", null,null,null,"" );


    Is there any setting I ignore?

    Thanks a million.
    Ricky.
  2. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 18 Dec 2007 Link to this post

    Hi, this problem is caused my ignorance.

    I should add RadWindow to RadWindowManager instead of a PlaceHolder.

    Ricky.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top