2011-03-25 57 views

回答

2

如果您希望樹節點,而不是複選框前添加一個單選按鈕:

protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs e) 
{ 
    e.Node.Text = "<input type='radio' />" + e.Node.Text; 
} 

protected override void Render(HtmlTextWriter writer) 
{ 
    base.Render(writer); 
    TreeView1.RenderControl(writer); 
}

希望它可以幫助