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

Getting RadMaskedTextBox Client Object on other Page.

3 Answers 62 Views
Input
This is a migrated thread and some comments may be shown as answers.
Shahid
Top achievements
Rank 1
Shahid asked on 17 May 2009, 07:09 AM
Hi,

I have a RadMaskedTextBox on Page A.aspx, I navigated to some other Page B.aspx with the Id of RadMaskedTextBox of Page A.aspx.
Now I need to get the client side object of RadMaskedTextBox on page B.aspx to manipulate its value.

I can not use
var maskedTextBox = $find("
<%= RadMaskedTestBox1.ClientID %>");
because, the control is not on page B.aspx.
Is there a way to achieve, what I am trying to do..?

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 20 May 2009, 05:25 AM
Hello Shahid,

You should pass the value of textbox control to next page(in query string for example) before navigating from one page to another. When you navigate away from one page it is destroyed and you cannot manipulate any control on the previous one.

You will have same experience with regular asp TextBox server control or any other control.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Shahid
Top achievements
Rank 1
answered on 20 May 2009, 06:04 AM
Hi Nikolay,

Let me explain you the problem once again. I have a RadMaskedTextBox, and a normal asp textbox on an aspx page. These controls should be filled by the data from PopUp window  and not manually.Now for populating the normal asp textbox I have used this
in the popup window

var openerPage = contentWindow.document; 
var textBox = openerPage.getElementById(textBoxID);//textBoxID is the ID of normal asp textbox send to PopUp window through query string

after getting the object of normal asp textbox I am able to assign the data from popup window to the textbox on aspx page.
I have tried this for the RadMaskedTextBox also, I am able to get its object, although it do not have all the methods/Properties so that I could set its value from PopUp window.

 

 

 

  
in the PopUp window I can not use 
var maskedTextBox = $find("<%= RadMaskedTextBox1.ClientID %>");
because the control is not on Popup Window page.

Is there any way to get the object of RadmaskedTextBox1 on PopUp window and populate its value from there..?

0
Nikolay Rusev
Telerik team
answered on 25 May 2009, 08:22 AM
Hello Shahid,

What do you mean by saying that you cannot use $find to get client object reference?
RadMaskedTextBox as IScriptControl has client object and as such to get reference to that client object you should use $find.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Input
Asked by
Shahid
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Shahid
Top achievements
Rank 1
Share this question
or