Implementing
DialogResult confirmation
yes/no:
I have some
tree structured data in windows application I want confirmation before any
action on child nodes.
i.e Delete
Node, Update title for node , Copy node etc. how I can implement that?
Solution:
You can Display
a confirmation dialog, using simple yes/no dialog, check following code for
same
//Code that confirms weather you want to delete node
DialogResult dialogResult = MessageBox.Show("Do you want to delete this node?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dialogResult == DialogResult.No)
{
return
false;
}
else
{
//proceed deleting node
}