Link to home
Create AccountLog in
Avatar of razza_b
razza_b

asked on

C# treeview node

Anyone know how i can select a child node in a treeview that goes and calls a SP?
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

something like:

private void treeView1_Click(object sender, EventArgs e)
{

switch(treeView1.SelectedNode.Text.ToUpper())
{

case "A":
//Your code

case "B":
//Your code



}



}
Avatar of razza_b
razza_b

ASKER

yes something like that..

or
private void treeView1_Click(object sender, EventArgs e)
{
    if(treeView1.SelectedNode.Text.ToUpper())
    {
        // db conn code
        //call SP with selected node text
    }
}

but everytime i select a different node will this constantly call db sp?
ASKER CERTIFIED SOLUTION
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer