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

UpdatePanel implementation in Telerik [Need help]

1 Answer 62 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 21 Sep 2014, 05:24 PM
Hello,

I am new to telerik controls & I want to use telerik control equivalent to updatepanel. I have an update panel with 4 dropdowns[please find below code block] . On Page load, the Coach Team and Player Team dropdownlist is properly loaded. On either of the dropdowns selectedindex change, the corresponding Coach name or player name does not load and the list is empty after writing the server side code for the same.Please guide me in the right way to acheive this.

<
body>
    <form id="form1" runat="server">
    <div>
    <asp:UpdatePanel ID="upnl1" runat="server" UpdateMode="Always">
    <ContentTemplate>
    <table style="margin-left:10px; margin-right:10px; width:85%;" class="tbltxtalign">
            <tr  style="height:50px;">
                <td>Coach Team's Name</td>
                <td>
                  <telerik:RadDropDownList ID="rddlcteamname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Coach Team">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvcteamname" runat="server" ControlToValidate="rddlcteamname" ErrorMessage="Coach Team Name">*</asp:RequiredFieldValidator>
                </td>
                <td>Player's Team</td>
                <td>
 <telerik:RadDropDownList ID="rddlpteamname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Player Team">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvpteamname" runat="server" ControlToValidate="rddlpteamname" ErrorMessage="Player Team name">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr  style="height:50px;">
                <td>Coach Name</td>
                <td>
 <telerik:RadDropDownList ID="rddlcfullname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Coach Name">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvcfullname" runat="server" ControlToValidate="rddlcfullname" ErrorMessage="Select Coach">*</asp:RequiredFieldValidator>
 
                </td>
                <td>Player Name</td>
                <td>
 <telerik:RadDropDownList ID="rddlpfullname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Player Name">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvpfullname" runat="server" ControlToValidate="rddlpfullname" ErrorMessage="Select Player">*</asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>


Thank You in Advance !,

~J

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 24 Sep 2014, 01:08 PM
Hi John,

You could simply warp the controls on the page with RadAjaxPanel as you already did with asp UpdatePanel. The code will work the same way as with asp UpdatePanel. See the code below:
<telerik:RadAjaxPanel runat="server" ID="radAjaxPanel1">
    <table style="margin-left:10px; margin-right:10px; width:85%;" class="tbltxtalign">
            <tr  style="height:50px;">
                <td>Coach Team's Name</td>
                <td>
                  <telerik:RadDropDownList ID="rddlcteamname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Coach Team">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvcteamname" runat="server" ControlToValidate="rddlcteamname" ErrorMessage="Coach Team Name">*</asp:RequiredFieldValidator>
                </td>
                <td>Player's Team</td>
                <td>
 <telerik:RadDropDownList ID="rddlpteamname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Player Team">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvpteamname" runat="server" ControlToValidate="rddlpteamname" ErrorMessage="Player Team name">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr  style="height:50px;">
                <td>Coach Name</td>
                <td>
 <telerik:RadDropDownList ID="rddlcfullname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Coach Name">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvcfullname" runat="server" ControlToValidate="rddlcfullname" ErrorMessage="Select Coach">*</asp:RequiredFieldValidator>
  
                </td>
                <td>Player Name</td>
                <td>
 <telerik:RadDropDownList ID="rddlpfullname" runat="server" Width="230" AutoPostBack="True" DefaultMessage="Player Name">
                        </telerik:RadDropDownList>
                    <asp:RequiredFieldValidator ID="rfvpfullname" runat="server" ControlToValidate="rddlpfullname" ErrorMessage="Select Player">*</asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
        </telerik:RadAjaxPanel>


Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Ajax
Asked by
John
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or