Hi, I have a Repeater inside a RadAjaxPanel, and each repeater item has a DropDownList with Autopostback. When I change the DropDownList selection a full postback happens instead of a partial one. I tried wrapping my repeater in an extra panel and add configuration to the AjaxManager but with no luck. If I try to create settings programmatically on the DropDownList then no postback happens at all. Can you please help? Here is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AjaxTest.aspx.cs" Inherits="AppointmentsScheduling.Web.AjaxTest" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="ScriptManager" runat="server" EnableViewState="true"></telerik:RadScriptManager> <telerik:RadAjaxManager ID="AjaxManager" runat="server"> <AjaxSettings> </AjaxSettings> </telerik:RadAjaxManager> <div> <telerik:RadAjaxPanel ID="AjaxActionPanel" runat="server"> <asp:Repeater ID="AppointmentList" runat="server"> <ItemTemplate> <div class="column statuscolumn"> <asp:Label ID="lblStatus" runat="server" Text="* Status" AssociatedControlID="Status" CssClass="required" /> <asp:DropDownList ID="Status" runat="server" AutoPostBack="true" onselectedindexchanged="Status_SelectedIndexChanged"> <asp:ListItem Text="1" Value="1" /> <asp:ListItem Text="2" Value="2" /> </asp:DropDownList> </div> </ItemTemplate> </asp:Repeater> </telerik:RadAjaxPanel> </div> </form></body></html>
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;namespace AppointmentsScheduling.Web{ public partial class AjaxTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AppointmentList.DataSource = new int[] { 1, 2, 3 }; AppointmentList.DataBind(); } } protected void Status_SelectedIndexChanged(object sender, EventArgs e) { var Status = (DropDownList)sender; var lblStatus = (Label)Status.Parent.FindControl("lblStatus"); lblStatus.Text = "* Status " + Status.SelectedValue; } }}