Dynamic 动态添加单选按钮到Treeview时未激发事件

Dynamic 动态添加单选按钮到Treeview时未激发事件,dynamic,event-handling,treeview,radio-button,Dynamic,Event Handling,Treeview,Radio Button,我需要在每个节点的右侧动态添加单选按钮,如果用户单击该按钮,我需要在数据库中进行一些更改 目前,我正在使用Radiobutton构建一个表,并将其添加到Treeview节点的节点文本中。一切正常,但Eventhandler不工作 谁能帮帮我吗 HtmlTable oItemTable = new HtmlTable(); oItemTable.Width = "100%"; HtmlTableRow oItemRow = new HtmlTableRow(); HtmlTableCell oIt

我需要在每个节点的右侧动态添加单选按钮,如果用户单击该按钮,我需要在数据库中进行一些更改

目前,我正在使用Radiobutton构建一个表,并将其添加到Treeview节点的节点文本中。一切正常,但Eventhandler不工作

谁能帮帮我吗

HtmlTable oItemTable = new HtmlTable();
oItemTable.Width = "100%";
HtmlTableRow oItemRow = new HtmlTableRow();
HtmlTableCell oItemDescCell = new HtmlTableCell();
oItemDescCell.Width = "200px";
oItemDescCell.InnerText = sItemID;
oItemRow.Cells.Add(oItemDescCell);

HtmlTableCell oItemMonitorCell = new HtmlTableCell();
oItemMonitorCell.Width = "10px";
RadioButton rdbItemMonitor = new RadioButton();
rdbItemMonitor.ID = sItemID + "M";
rdbItemMonitor.GroupName = sItemID;
rdbItemMonitor.AutoPostBack = true;
rdbItemMonitor.CheckedChanged += new EventHandler(rdbItemMonitor_OnCheckedChanged);
oItemMonitorCell.Controls.Add(rdbItemMonitor);
oItemRow.Cells.Add(oItemMonitorCell);
StringBuilder sbItemTable = new StringBuilder();
using (StringWriter swItemTable = new StringWriter(sbItemTable))
{
using (HtmlTextWriter twSegmentTable = new HtmlTextWriter(swItemTable))
{
oItemTable.RenderControl(twSegmentTable);
}
}

oNodeItem.Text = sbItemTable.ToString();
trvMyPlans.Nodes.Add(oNodeItem);