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:
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
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> |
What am I doing wrong?
Please help,
Miklos