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

[Solved] Rad control in RadWindow values not acquired.

1 Answer 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
Miklos
Top achievements
Rank 1
Miklos asked on 23 Jun 2008, 08:28 PM
Hi,

I have a main page with a RadAjaxPanel. This panel has a button which opens a radwindow with a form. In the form I have the following:

<form id="personalform" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
 
    <div> 
        PERSONAL INFORMATION<br /> 
         
         
        <script type="text/javascript"
             
                 function OnClientCancel(editor) 
                 { 
                    Cancel_Clicked(); 
                    return false; 
                 } 
                 
                function GetRadWindow() 
                { 
                    return window.radWindow || window.frameElement.radWindow; 
                }    
                     
                function OnClientCancel() 
                { 
                    var oWindow = GetRadWindow();            
                    oWindow.close(); 
                     
                    return false; 
                }    
                 
                function OnClientSubmit() 
                { 
                    var oWindow = GetRadWindow();            
                    oWindow.close(); 
                }        
            </script> 
     <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
            <asp:Label ID="Label1" runat="server" Text="Firstname:"/> 
        <telerik:RadTextBox ID="UserFirstName" runat="server" Skin="Web20"
        </telerik:RadTextBox><br /> 
        <asp:Label ID="Label2" runat="server" Text="Middlename:"/><telerik:RadTextBox ID="UserMiddleName" runat="server"
        </telerik:RadTextBox><br />  
       <asp:Label ID="Label3" runat="server" Text="Lastname:"/> <telerik:RadTextBox   ID="UserLastName" runat="server"
        </telerik:RadTextBox><br />  
       <asp:Label ID="Label4" runat="server" Text="Date of birth:"/> 
        <telerik:RadDatePicker 
           ID="UserDob" runat="server" MinDate="1900-01-01"
            <DateInput InvalidStyleDuration="100" runat="server"></DateInput> 
       </telerik:RadDatePicker> 
        <br /> 
        <asp:Label ID="Label5" runat="server" Text="Photo:"/><asp:Image ID="UserImage" runat="server" /> 
        <br /> 
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
  
        <br />   
 </telerik:RadAjaxPanel>
<asp:Literal ID="InjectScript" runat="server"></asp:Literal> 
         <asp:Button ID="SaveBtn" runat="server" Text="Save" onclick="SaveBtn_Click" /> 
        <asp:Button ID="CancelBtn" runat="server" Text="Cancel" OnClientClick="OnClientCancel()"/> 
             
         
    </div> 
    </form>

In the codebehind I have a handler for the SaveBtnClick. My problem is the following. ALL Rad controls are not retrieved only the standard TextBox's value. This is not good since I have a datecontrol and textboxes based on Rad. Why aren't the values updated when I click Save? So if I get the value of UserFirstName.Text it returns the same as upon the window open, however if I get the value of TextBox1.Text which is a standard asp textbox then the value is returned correctly. I also tried without the radajaxpanel but to no avail

What am I doing wrong?

Please help,
Miklos

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 24 Jun 2008, 12:07 PM
Hello Miklos,

I tested your code but with or without being opened in RadWindow, the values are taken correctly. Can you please check the attached movie and let me know if I am missing something?

If you still experience problems, please open a support ticket and send us a sample project which we can check locally.


Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Miklos
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or