开发者

How to get values from treeview checkbox - on which event do I have to write code?

I have code to get values from treeview checkbox. But I am not getting on which event I should write it so that it will work properly. I tried it on treeview1.SelectedNodeChanged, but it is not working. My code is:

protected void TV_Account_SelectedNodeChanged(object sender, EventArgs e)
{
    foreach (TreeNode tn in this.TV_Account.Nodes)
    {
        if (tn.Checked == true)
开发者_如何学C        {
            ListBox1.Items.Add(tn.Value);
        }
    }

}


You are probably looking for the AfterCheck and BeforeCheck events.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜