There are some articles what you can find around this topic. You need to force postback to your TreeView.
You need to create a forcing JavaScript function first:
function forcePostBack() {
var yourObject = window.event.srcElement;
if (yourObject .tagName == "INPUT" && yourObject.type == "checkbox") {
__doPostBack("","");
}
}
After in page load method you need to add click event for your TreeView
protected void Page_Load(object sender, EventArgs e)
{
tvData.Attributes.Add("onclick", "forcePostBack()");
}
After you need to use TreeNodeCheckChanged event instead of SelectedNodeChanged as follow:
protected void tvData_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
tdCtry.Visible = !tvData.SelectedNode.Text.Equals("Country");
}
Please let me know if it's working or not!