This is a migrated thread and some comments may be shown as answers.

top left position lost after second window

1 Answer 55 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ben White
Top achievements
Rank 1
Ben White asked on 25 Jan 2011, 05:30 PM
Hi,

I have a repeater list with two links in each row.

I have a radwindow manager.

If I click on one of the links, the rad window pops up as per normal.
Without closing the current popup, if I then click on another link, the new window opens but the position defaults to top left (0,0) and the window loses it offset element.

Please could you advise - I have included the javascript which gets called below. The a href links which call this code are:
<a href="#" onclick="openRadWindow('11', 'Mr. Benjamin White', '1', ' ', ' ', ' ', ' ', '1/MzOBjfbqkF-6dOtzU4dnlVCR3DkkRp0XvTyoiwwKljQ','9','19/01/2011,21/01/2011,22/01/2011','crewbook@gcdemos3.co.uk','07983633674','2'); return false;">Edit</a>
<a href="#" onclick="openQVWindow('11'); return false;">Mr. Benjamin White</a>

There can be any number of these hrefs, each time one is clicked I wish the contents of the pop up window to be refreshed and the position to stay in the same place.

I have two javascript functions as I need to open the windows in two different sizes.

Thanks.

<script type="text/javascript">
            function openRadWindow(EngID, EngName, EngJobSkillID, ClientInviteSentOn, ClientConfirmationSentOn, EngineerInviteResponseOn, EngineerConfirmationResponseOn, GoogleSessionToken, JobID, BookedDatesString, EngEmailAddress, EngMobile, SubscriptionType) {
                var InternalJobRef = $("[id$='_lblJobTitle_Ref']").html();
                var JobTitle = $("[id$='_lblJobTitle']").html();
                var oWnda = radopen("DialogEditResourceBooking.aspx?engID=" + EngID + "&EngName=" + EngName + "&EngJobSkillID=" + EngJobSkillID + "&ClientInviteSentOn=" + ClientInviteSentOn + "&ClientConfirmationSentOn=" + ClientConfirmationSentOn + "&EngineerInviteResponseOn=" + EngineerInviteResponseOn + "&EngineerConfirmationResponseOn=" + EngineerConfirmationResponseOn + "&GoogleSessionToken=" + GoogleSessionToken + "&JobID=" + JobID + "&BookedDates=" + BookedDatesString + "&JobTitle=" + JobTitle + "&InternalJobRef=" + InternalJobRef + "&EngEmailAddress=" + EngEmailAddress + "&EngMobile=" + EngMobile + "&SubscriptionType=" + SubscriptionType, "RadWindow1");
                oWnda.setSize(430, 400);
                oWnda.set_offsetElementID($("#<%=refreshResultsGrid.ClientID %>").attr('id'));
            }
            function openQVWindow(EngID) {
                var oWndb = radopen("DialogQuickViewEngineer.aspx?engID=" + EngID, "RadWindow1");
                oWndb.setSize(550, 650);
                oWndb.set_offsetElementID($("#<%=refreshResultsGrid.ClientID %>").attr('id'));
            }
        </script>

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 28 Jan 2011, 10:53 AM
Hi Ben,

OpenerElementID / OffsetElementID are not suitable for databinding scenarios and they cannot be set from the client (there is a setter, but it is just to follow the ASP.NET AJAX convention that all server-side properties must have a setter and getter. In such scenarios it is recommended to use RadWindow's client-side or server-side API. For example you can check the following KB that shows a similar logic to the one that you wish to implement:
http://www.telerik.com/support/kb/aspnet-ajax/window/binding-to-a-grid-opening-windows-by-clicking-grid-items.aspx

Greetings,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Window
Asked by
Ben White
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or