C# Edit TreeView Node

How To Update Selected Node From TreeView Using C#

Edit TreeView Node Using C#



In this C# Tutorial we will see How To Edit The Selected TreeView Node Name And Text With Value From TextBox On Button Click Event In CSharp Programming Language And Visual  Studio Editor.




Project Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class TreeView_Edit_Node : Form
    {
        public TreeView_Edit_Node()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            treeView1.SelectedNode.Name = textBox1.Text;
            treeView1.SelectedNode.Text = textBox1.Text;
        }
    }
}



OutPut:

Update Selected TreeView Node In C#




Share this

Related Posts

Previous
Next Post »