Solved

SelectedNodeChanged definition not found when compiled. Say What?

Posted on 2009-04-03
2
346 Views
Last Modified: 2012-06-27
Ok so I've got this SQL DB browser in the works that I'm trying to implements a Tree structure for the Database/Table display. After several days of extensive research I've been left at an impasse as to why the CSC.exe compiler is telling me that this SelectedNodeChanged event is not a valid definition. I've set up all the using's that I believe are necessary and the rest of the program will compile just fine once the offending code is commented out. The only other references I've seen to this are in Web based apps. Being that this is being designed as a WinForm app these suggestions are of little substance to me. Even MSDN says it's there and should work. Any help with this would be greatly appriciated.

Please note: I'm not using any sort of GUI based dev system. This solution is being entirely coded through Notepad++ and compiled through DOS.
using System;
using System.Resources;
using System.Web;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows;
using System.IO;
using System.Xml;
 
//treDBs
this.treDBs.Name = "treDBs";
this.treDBs.Location = new System.Drawing.Point(0, 215);
this.treDBs.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
this.treDBs.Size = new System.Drawing.Size(250, 212);
this.treDBs.DoubleClick += new EventHandler(treDBs_DoubleClick);
this.treDBs.SelectedNodeChanged += new EventHandler(treDBs_SelectedNodeChanged);
 
private void treDBs_SelectedNodeChanged(object sender, EventArgs e)
{
	this.btnQuery.Enabled = true;
	MakeCon(this.treDBs.SelectedNode.ToString());
	PopulateDBTable(this.treDBs.SelectedNode.ToString());
}

Open in new window

0
Comment
Question by:Zexks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
jjardine earned 125 total points
ID: 24064387
maybe you want to pick an event that works with the windows version of the Treeview.    Maybe AfterSelect will work for what you want.  Here is a list of the available events.  http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview_events(VS.85).aspx

this.treDBS.AfterSelect += new EventHandler(treDBs_AfterSelect);

private void treDBs_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{

}
0
 

Author Closing Comment

by:Zexks
ID: 31566440
Thanks man, you have saved me from a prospective weekend of endless searching.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question