15,918,889 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Gauri Bharde (Top 12 by date)
Gauri Bharde
2-Jun-14 2:10am
View
sir, actually I want to insert this treeview into .rtf document dynamically in my Windows app.how to write code?
Gauri Bharde
20-Feb-14 0:05am
View
yes ....this is Win form application we are discussing and i have not done any WinAPI programming using an over-ride of WndProc.
Gauri Bharde
18-Feb-14 3:46am
View
thanks sir.
Gauri Bharde
18-Feb-14 1:01am
View
Thanks sir i have tried this code but same problem occurs as mentioned above,is any solution to removing checkbox for specific node? It means using above code disable perticuler node,if is possible to remove checkbox for these perticuler node?
Gauri Bharde
7-Jan-14 4:16am
View
thanks!!!!
Gauri Bharde
1-Jan-14 4:12am
View
thanks sir i will try it immediately
Gauri Bharde
24-Dec-13 4:20am
View
sir i have tried above code.Create New parent code are Sucessfully done.
but In existing parent node ,there is problem to assign treeview.selectednode=currentnode.
actually my Currentnode = new TreeNode(comboBox1.Text);
code as follows:
else // use an existing Node as Parent
{
currentNode = new TreeNode(comboBox1.Text);
treeViewDept.SelectedNode = currentNode;
if (currentNode == null)
{
if (treeViewDept.Nodes.Count == 0)
{
MessageBox.Show("Create a new Node, and then add Nodes to it.");
}
else
{
MessageBox.Show("Choose an existing Node to add the new Node to.");
}
return;
}
else
{
newChildNode = new TreeNode(textBoxSubDept.Text.ToString() + ": added Child: " + addedNodeID.ToString());
currentNode.Nodes.Add(newChildNode);
newChildNode.EnsureVisible();
treeViewDept.SelectedNode = newChildNode;
addedNodeID++;
}
}
but still child node not added into existing parent node.
Gauri Bharde
23-Dec-13 23:33pm
View
thanks i will try it immediately.
Gauri Bharde
23-Dec-13 8:02am
View
this is my code plz check
private void btnAddNew_Click(object sender, EventArgs e)
{
if (radioButtonNewParent.Checked == true)
{
int index;
TreeNode Node=treeViewDept.Nodes.Add(textBoxNewParent.Text);
treeViewDept.SelectedNode = Node;
//TreeNode child = treeViewDept.SelectedNode.Nodes.Add(textBox1.Text);
//treeViewDept.SelectedNode = child;
Node.BackColor = System.Drawing.Color.LightBlue;
btnSave.Enabled = true;
btnSave.Focus();
}
if (radioBtnexistingparent.Checked == true)
{
TreeNode Node = new TreeNode(comExistingParent.Text);
treeViewDept.SelectedNode = Node;
TreeNode child = treeViewDept.SelectedNode.Nodes.Add(textBox1.Text);
treeViewDept.SelectedNode = child;
Node.BackColor = System.Drawing.Color.LightBlue;
btnSave.Enabled = true;
btnSave.Focus();
treeViewDept.Nodes.Add(comExistingParent.Text, textBox1.Text);
SearchAndAdd(comExistingParent.Text, textBox1.Text);
TreeNode node= treeViewDept.Nodes[comExistingParent.Text].Nodes.Add(textBox1.Text);
treeViewDept.SelectedNode = node;
btnSave.Enabled = true;
btnSave.Focus();
}
}
Gauri Bharde
23-Dec-13 8:01am
View
My code -
if (radioButtonNewParent.Checked == true)
{
int index;
TreeNode Node=treeViewDept.Nodes.Add(textBoxNewParent.Text);
treeViewDept.SelectedNode = Node;
Node.BackColor = System.Drawing.Color.LightBlue;
btnSave.Enabled = true;
btnSave.Focus();
}
if (radioBtnexistingparent.Checked == true)
{
TreeNode Node = new TreeNode(comExistingParent.Text);
treeViewDept.SelectedNode = Node;
TreeNode child = treeViewDept.SelectedNode.Nodes.Add(textBox1.Text);
treeViewDept.SelectedNode = child;
Node.BackColor = System.Drawing.Color.LightBlue;
btnSave.Enabled = true;
btnSave.Focus();
treeViewDept.Nodes.Add(comExistingParent.Text, textBox1.Text);
SearchAndAdd(comExistingParent.Text, textBox1.Text);
TreeNode node= treeViewDept.Nodes[comExistingParent.Text].Nodes.Add(textBox1.Text);
treeViewDept.SelectedNode = node;
btnSave.Enabled = true;
btnSave.Focus();
}
Gauri Bharde
19-Dec-13 3:51am
View
thanks!!
Gauri Bharde
19-Dec-13 1:23am
View
treeViewDept.Nodes.Add(textBoxNewParent.Text);
btnSave.Enabled = true;
btnSave.Focus();
treeViewDept.Focus();
actually this is my code.I want to create new node through textbox.
when click on create new node button,new node added into treeview.but i want to focus on that node bydefault without selecting that node.
i am trying to treeview1.selectednode= textBoxNewParent.Text;
but there is error occurs.how to solve this problem?
Show More