RadTextBox text doesn't submitted

1 posts, 0 answers
  1. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 19 Feb 2012 Link to this post

    Hi,

    I have a problem when the RadTextBox is placed within a RadAjaxPanel control as below.
    By clicking submit, the RadTextBox text doesn't submitted. By removing the AutoPostBack attribute and the OnSelectedIndexChanged event of the RadComboBox controls then the RadTextBox text does submit. In addition If I don't use the RadAjaxPanel control then the RadTextBox text does submit too.

    aspx:
    <telerik:RadAjaxPanel ID="SSS" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="700px">
        <tr>
            <td width="120">
                <asp:Label ID="CyclLabel" runat="server" SkinID="FieldLabel" Text="Cycle:"></asp:Label>
            </td>
            <td  width="250">
                <telerik:RadComboBox ID="CycleRadComboBox" runat="server" Enabled="true" Width="215px" AutoPostBack="true" OnSelectedIndexChanged="CycleRadComboBox_SelectedIndexChanged">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="Select Cycle" Value="" />
                        <telerik:RadComboBoxItem runat="server" Text="BVT" Value="BVT" />
                        <telerik:RadComboBoxItem runat="server" Text="GQL" Value="GQL" />
                    </Items>
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </telerik:RadComboBox>
            </td>
            <td  width="100">
                <asp:Label ID="StatusLabel" runat="server" SkinID="FieldLabel" Text="Status:"></asp:Label>
            </td>
            <td width="*">
                <telerik:RadComboBox ID="StatusRadComboBox" runat="server" Enabled="false" Width="215px" AutoPostBack="true" OnSelectedIndexChanged="StatusRadComboBox_SelectedIndexChanged">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="Select Status" Value="" />
                        <telerik:RadComboBoxItem runat="server" Text="Passed" Value="Passed" />
                        <telerik:RadComboBoxItem runat="server" Text="Failed" Value="Failed" />
                        <telerik:RadComboBoxItem runat="server" Text="Passed with known issues" Value="Passed with known issues" />
                    </Items>
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr style="height:55px;" >
            <td valign="top" width="120">
              <div style="margin-top:9px;" >
                <asp:Label ID="CmntLabel" runat="server" SkinID="FieldLabel" Text="Comment:"></asp:Label>
              </div>
            </td>
            <td colspan="3"  width="*">
                <telerik:RadTextBox ID="CommentRadTextBox" runat="server"  Width="560px" TextMode="MultiLine" Rows="2"></telerik:RadTextBox>
            </td>
        </tr>
        <tr style="height:50px;">
            <td colspan="4">
                <asp:Button ID="SubmitButton" runat="server" SkinID="ImageAndTextButton" OnClick="SubmitButton_Click" Text="Submit" />
            </td>
        </tr>
    </table>
    <asp:Label ID="CommentTextLabel" runat="server" Text=""></asp:Label>
    </telerik:RadAjaxPanel>

    c#:
    protected void Page_Load(object sender, EventArgs e)
            {
     
            }
     
            protected void SubmitButton_Click(object sender, EventArgs e)
            {
                CommentTextLabel.Text = CommentRadTextBox.Text;
            }
     
            protected void CycleRadComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
            {
                if (!Convert.ToString(e.Value).Equals(string.Empty))
                    StatusRadComboBox.Enabled = true;
                else
                {
                    StatusRadComboBox.Enabled = false;
                    CommentRadTextBox.Enabled = false;
                }
            }
     
            protected void StatusRadComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
            {
                if (!Convert.ToString(e.Value).Equals(string.Empty))
                    CommentRadTextBox.Enabled = true;
                else CommentRadTextBox.Enabled = false;
            }


    Can you please expalin to me how to fix this problem?

    Regards,
    Bader
Back to Top