0
private void treeView_DoubleClick(object sender, EventArgs e)
{
if (pRetorno == true)
{
if (treeView.SelectedNode != null)
{
pOc = new OcorrenciasCategoriasDAO().Buscar(Convert.ToInt32(treeView.SelectedNode.Tag));
this.Close();
}
}
}
Don’t fall in the event DoubleClick
, by double clicking on all treeview area and also we.
I did the test here with me and it worked. An observation. If treeview is empty, that is, without at least one knot, it won’t work at all. It is necessary to have some information in treeview, at least one to call the event in question.
– pnet
@pnet you marked me mistakenly. I should have marked the post OP.
– DontVoteMeDown
Now that I saw it. It should be for Marcelo Marin, I’m sorry, man, it was unintentionally.
– pnet