VisualWebpart - controls like radiobuttonlist and dropdownlist not firing the SelectedIndexChanged event when inside a repeater datarow.
Any help?
Source code:
Site URL HyperLink Admins 1 2 The following are identified as the child sites of the above site, please select the appropriate properties next to it. Inherit Parent Site Do-not Inherit Parent Site Select EMEA LTAM --%>using System; using System.ComponentModel; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using System.Data;
namespace DeriveMigrationData.DeriveSiteAdminForm { [ToolboxItem(false)] public partial class DeriveSiteAdminForm : System.Web.UI.WebControls.WebParts.WebPart { protected override void OnInit(EventArgs e) { base.OnInit(e); InitializeControl(); }
DataTable dt;
protected void Page_Load(object sender, EventArgs e)
{
string siteurl; string admins;
int itemid = SPContext.Current.ItemId;
dt = BLL.SiteAdminData.GetAdminsData(SPContext.Current.Web.CurrentUser.LoginName, SPContext.Current.ListId);
BLL.SiteAdminData.GetCurrentItem(dt, itemid, out siteurl, out admins);
HyperLink1.NavigateUrl = siteurl;
HyperLink1.Text = siteurl;
string[] adm = admins.Split(';');
RadioButtonList1.DataSource = BLL.SiteAdminData.getResolvedUsers(adm, SPContext.Current.Web);
//RadioButtonList1.DataSource = adm;
RadioButtonList1.DataTextField = "Name";
RadioButtonList1.DataValueField = "LoginName";
RadioButtonList1.DataBind();
BindChildSites(dt, siteurl);
}
private void BindChildSites(DataTable dt, string siteurl)
{
RpChildSites.DataSource = BLL.SiteAdminData.GetAdminsSiteChilds(dt, siteurl);
RpChildSites.DataBind();
//GridView1.DataSource = RpChildSites.DataSource;
//GridView1.AutoGenerateColumns = true;
//GridView1.DataBind();
}
protected void RBinheritParent_SelectedIndexChanged(object sender, EventArgs e)
{
if (((RadioButtonList)sender).SelectedValue.Equals("Inherit"))
{
//showthe current row prop
}
}
protected void RpChildSites_ItemCommand(object source, RepeaterCommandEventArgs e)
{
ControlCollection c = (ControlCollection)RpChildSites.Controls;
}
protected void DDRegion_SelectedIndexChanged(object sender, EventArgs e)
{
//triggers on the region change, load other data
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
//test
}
}
}