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

Rad Window ClientID not return the full id

3 Answers 155 Views
Window
This is a migrated thread and some comments may be shown as answers.
vn
Top achievements
Rank 1
vn asked on 22 May 2008, 12:55 AM
Hi,

I have a RadWindow named rtbStreetAddress inside a usercontrol.  The problem I am having is the rwEditAddress.ClientID property is not returning the full client id as expected in the Page_Load or OnPreRender methods. 
It returning "rwEditAddress" instead of "ctl00_cDefaultContent_cAddresses_cBillingAddress_rwEditAddress"
I have a rad text box in the user control and it returning the correct client id "ctl00_cDefaultContent_cAddresses_cBillingAddress_rtbCity"

Vincent

3 Answers, 1 is accepted

Sort by
0
Dimcho
Telerik team
answered on 23 May 2008, 02:39 PM
Hello Vincent,

If you have RadWindow named rtbStreetAddress and it is not inside a RadWindowManager control, the rtbStreetAddress.ClientID will return the value you expected - YourUserControlID_ClientID.

If you have put the window inside a RadWindowManager then rtbStreetAddress.ClientID will return only the ClientID.

This is related to the manager control and its functionality.

Let us know what is your exact scenario and we will do our best to help.

Sincerely yours,
Dimcho
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Samaira
Top achievements
Rank 1
answered on 19 Nov 2013, 11:07 AM

In a userControl I have a radWindow within a RadWindowManager. This usercontrol is called from a MasterPage.
RadWindow close button functionality  is not working from masterPage. If this user control called from normal .aspx page, close button works perfectly. Below is the code used for radwindow close button

 function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;

        }

        function OnClientClose(oWnd, eventArgs) {
            var oWnd = GetRadWindowManager().getWindowByName("radWindow");
            oWnd.close();          
            eventArgs.set_cancel(true);
        }

0
Samaira
Top achievements
Rank 1
answered on 19 Nov 2013, 12:03 PM
Well i resolved it by myself. I used below JS code snippet :

 function OnClientClose(oWnd, eventArgs) {
          var wind = $find('<%=radWindowID.ClientID %>');            
            wind.close();

            eventArgs.set_cancel(true);          
        }


Regards
Samaira Shariff

Tags
Window
Asked by
vn
Top achievements
Rank 1
Answers by
Dimcho
Telerik team
Samaira
Top achievements
Rank 1
Share this question
or