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

[Solved] Problem in reading updated text from RadTextBox

4 Answers 264 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Siva
Top achievements
Rank 1
Siva asked on 08 May 2009, 10:00 PM
Hello,

I have about 10 RadTextBoxes on a web page which get populated from database in page load. I have to edit the text in these textboxes and save the updated text back in database.

The problem is: two of the RadTextBoxes do not give me the updated text. I debugged my code and found that they are retaining the values they get in page load.

I replaced those two RadTextBoxes with standard ASP.NET TextBox they worked fine.

All the RadTextBoxes (which work fine and which don't) have same set of properties. I do not understand the reason behind this problem.

Please help me on this issue.

Thank You,
Siva

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 May 2009, 04:45 PM
Hello Siva,

The issue is indeed odd and I cannot say for certain what might be causing it. Can you please share with us the markup/source of the problematic page using the 'Format Code Block' options from the top right corner of the column editor? Thus I will be able to review your code logic in detail and advice you further.

Kind regards,
Sebastian
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
Siva
Top achievements
Rank 1
answered on 11 May 2009, 06:35 PM
Hello Sebastian,

Thanks for your reply. Following is the table I have in a content place holder.

The RadTextBox with ID 'txtUserID' does not give me the updated value. It gives me the value it has when the page is loaded. All the other RadTextBoxes are fine.

Please let me know if you need any more information.

 <table width="100%"
            <tr> 
                <td width="70%"
                    <table cellpadding="0" cellspacing="0" width="76%"
                        <tr> 
                            <td width="16%"
                                <asp:Label ID="lblUserName" runat="server" Text="Name:" CssClass="sideLabels"></asp:Label> 
                                <asp:Label ID="Label1" ForeColor="red" Font-Size="Smaller" runat="server">*</asp:Label> 
                            </td> 
                            <td width="28%"
                                <telerik:RadTextBox ID="txtFirstName" runat="server" Width="90%" TabIndex="1"
                                </telerik:RadTextBox> 
                            </td> 
                            <td width="14%"
                                <telerik:RadTextBox ID="txtMiddleName" runat="server" Width="65%" TabIndex="2"
                                </telerik:RadTextBox> 
                            </td> 
                            <td width="20%"
                                <telerik:RadTextBox ID="txtLastName" runat="server" TabIndex="3"
                                </telerik:RadTextBox> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="4"
                                <br /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td width="16%"
                                <asp:Label ID="lblUserType" runat="server" Text="User Type:" CssClass="sideLabels"></asp:Label> 
                            </td> 
                            <td width="28%"
                                <telerik:RadComboBox ID="cmbUserType" runat="server" Width="92%" Skin="WebBlue" TabIndex="4"
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </telerik:RadComboBox> 
                            </td> 
                            <td width="14%"
                                <asp:Label ID="lblUserID" runat="server" Text="User ID:" CssClass="sideLabels"></asp:Label> 
                                <asp:Label ID="lblStar3" ForeColor="red" Font-Size="Smaller" runat="server">*</asp:Label> 
                            </td> 
                            <td width="20%"
                                <telerik:RadTextBox ID="txtUserID" runat="server" TabIndex="5"
                                </telerik:RadTextBox> 
                            </td> 
                        </tr> 
                    </table> 
                <td width="70%"
            <tr> 
<table width="100%">


Thank You,

Siva
0
Sebastian
Telerik team
answered on 12 May 2009, 10:34 AM
Hello Siva,

Your RadTextBox definition seems fine to me. Can you please check whether you accidentally set EnableViewState = false for it from the code-behind of the page or get a javascript error on form submit which may prevent its value save? Additionally, does replacing it with standard MS TextBox and using RadInputManager to style it makes a difference in this case?

Let me know what your findings are.

Kind regards,
Sebastian
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
Siva
Top achievements
Rank 1
answered on 15 May 2009, 07:05 PM
Hi Sebastian,

My problem is due to a javascript error on the page. (I have tried to access a control in JavaScript which is made invisible.

I eliminated the javascript error and I could read the value correctly.

Thanks for your concern.

Thank You,

Siva
Tags
General Discussions
Asked by
Siva
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Siva
Top achievements
Rank 1
Share this question
or