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?
.NET Programming

Avatar of undefined
Last Comment
Praveen Kumar
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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo