Hi Mark,
As for the Datagrid's nested dropdownlist's postback issue, I think we can
check the following things first:
1. Has the dropdownlist been set as AutoPostBack= true?
2. How do you wireup the selectedIndexchanged event handler for the
dropdownlist?
Here is a test page , you may have a look to see whether there are any
difference:
=============aspx=============
<HTML>
<HEAD>
<title>ddlgrid</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<table width="100%" align="center">
<tr>
<td>
<asp

ataGrid id="dgMain" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="DropDownList">
<ItemTemplate>
<asp

ropDownList AutoPostBack="True" id="lstItems"
runat="server" OnSelectedIndexChanged="lstItems_SelectedIndexChanged"
SelectedIndex='<%# Container.DataItem %>'>
<asp:ListItem Value="aaaa" Selected="True">aaaa</asp:ListItem>
<asp:ListItem Value="bbbb">bbbb</asp:ListItem>
<asp:ListItem Value="cccc">cccc</asp:ListItem>
<asp:ListItem Value="dddd">dddd</asp:ListItem>
</asp

ropDownList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp

ataGrid>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</form>
</body>
</HTML>
======code behind==============
public class ddlgrid : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid dgMain;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if(!IsPostBack)
{
int[] values = new int[]{0,1,2,3,2,3,1,2};
dgMain.DataSource = values;
dgMain.DataBind();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
protected void lstItems_SelectedIndexChanged(object sender,
System.EventArgs e)
{
System.Web.UI.WebControls.DropDownList lst =
(System.Web.UI.WebControls.DropDownList)sender;
Response.Write("<br>New selected index of " + lst.ID + "is " +
lst.SelectedIndex );
}
}
===================================================
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx