Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

samidhas

@samidhas
About
Posts
24
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • want a help in the code...... [modified]
    S samidhas

    static void Main() { Application.Run(new Form1()); } private System.Windows.Forms.GroupBox grpbox; XPathDocument dom; XmlDocument doc; XPathNavigator nav; XPathExpression expr; XPathNodeIterator iterator; int cnt=0; Label lbl; TextBox txt; OpenFileDialog dlg; TreeNode newTreeNode,rootnode,parentnode; string text; int i; //int cnt = e.Node.GetNodeCount(false); //string filename; private void Form1_Load(object sender, System.EventArgs e) { //label1.Text = "File Path"; //label1.SetBounds(8, 8, 50, 20); //filename = Application.StartupPath + "\\Sample.xml"; //textBox1.Text= filename; //textBox1.SetBounds(64, 8, 256, 20); button1.Text = "Populate the TreeView with XML"; button1.SetBounds(8, 20, 200, 20); treeXml.Height = 600; treeXml.Width = 400; grpbox = new GroupBox(); grpbox.Height = 600; grpbox.Width = 400; grpbox.SetBounds(500, 2, 700, 600); grpbox.Visible = true; grpbox.Dock.Equals(Right); grpbox.Show(); this.Controls.Add(grpbox); //dom = new XPathDocument(dlg.FileName); } // it will acess the xml file into treeview private void ConvertXmlNodeToTreeNode(XmlNode xmlNode, TreeNodeCollection treeNodes) { TreeNode newTreeNode = treeNodes.Add(xmlNode.Name); switch (xmlNode.NodeType) { case XmlNodeType.ProcessingInstruction: case XmlNodeType.XmlDeclaration: newTreeNode.Text = "<?" + xmlNode.Name + " " + xmlNode.Value + "?>"; break; case XmlNodeType.Element: if (xmlNode.Name.ToLower().Equals("node") == true) { newTreeNode.Text = "<" + xmlNode.Attributes["label"].Value.ToString() + ">"; } else newTreeNode.Text = "<" + xmlNode.Name + ">"; break; case XmlNodeType.Attribute: newTreeNode.Text = xmlNode.Name; // newTreeNode.Text = "ATTRIBUTE: " + xmlNode.Name; break; case XmlNodeType.Text: case XmlNodeType.CDATA: newTreeNode.Text = xmlNode.Value; break; case XmlNodeType.Comment: newTreeNode.Text = "<!--" + xmlNode.Value + "-->"; break; } if (xmlNode.Attributes != null) { foreach (XmlAttribute attribute in xmlNode.Attributes) { ConvertXmlNodeToTreeNode(attribute, newTreeNode.Nodes); } } foreach (XmlNode childNode in xmlNode.ChildNodes) { ConvertXmlNodeToTreeNode(childNode, newTree

    C# html xml help question

  • how to add a now treenode in the following code?
    S samidhas

    if i want to insert a now node name an value , by entering it in the text box, and after cliking on button the node should be add to the tree view -------------------------------------------------------------------- private void Form1_Load(object sender, System.EventArgs e) { button1.Text = "Populate the TreeView with XML"; button1.SetBounds(8, 20, 200, 20); treeXml.Height = 600; treeXml.Width = 400; grpbox = new GroupBox(); grpbox.Height = 600; grpbox.Width = 400; grpbox.SetBounds(500, 2, 700, 600); grpbox.Visible = true; grpbox.Dock.Equals(Right); grpbox.Show(); this.Controls.Add(grpbox); } private void ConvertXmlNodeToTreeNode(XmlNode xmlNode, TreeNodeCollection treeNodes) { TreeNode newTreeNode = treeNodes.Add(xmlNode.Name); switch (xmlNode.NodeType) { case XmlNodeType.ProcessingInstruction: case XmlNodeType.XmlDeclaration: newTreeNode.Text = "<?" + xmlNode.Name + " " + xmlNode.Value + "?>"; break; case XmlNodeType.Element: if (xmlNode.Name.ToLower().Equals("node") == true) { newTreeNode.Text = "<" + xmlNode.Attributes["label"].Value.ToString() + ">"; } else newTreeNode.Text = "<" + xmlNode.Name + ">"; break; case XmlNodeType.Attribute: newTreeNode.Text = xmlNode.Name; // newTreeNode.Text = "ATTRIBUTE: " + xmlNode.Name; break; case XmlNodeType.Text: case XmlNodeType.CDATA: newTreeNode.Text = xmlNode.Value; break; case XmlNodeType.Comment: newTreeNode.Text = "<!--" + xmlNode.Value + "-->"; break; } if (xmlNode.Attributes != null) { foreach (XmlAttribute attribute in xmlNode.Attributes) { ConvertXmlNodeToTreeNode(attribute, newTreeNode.Nodes); } } foreach (XmlNode childNode in xmlNode.ChildNodes) { ConvertXmlNodeToTreeNode(childNode, newTreeNode.Nodes); } } --------------------------------------------------------------------------

    C# data-structures xml tutorial question

  • i want to insert a new node regarding this code.but insert is not working..
    S samidhas

    i just want to insert a new node in the treeview and xml file both , where i can insert name and values from textbox.... will u help in for code?

    C# html xml question

  • i want to insert a new node regarding this code.but insert is not working..
    S samidhas

    no i am not getting the logic how to do it? an confustion in a code....

    C# html xml question

  • i want to insert a new node regarding this code.but insert is not working..
    S samidhas

    private System.Windows.Forms.GroupBox grpbox; XPathDocument dom; XmlDocument doc; XPathNavigator nav; XPathExpression expr; XPathNodeIterator iterator; int cnt=0; Label lbl; TextBox txt; OpenFileDialog dlg; TreeNode newTreeNode; //int cnt = e.Node.GetNodeCount(false); //string filename; private void Form1_Load(object sender, System.EventArgs e) { //label1.Text = "File Path"; //label1.SetBounds(8, 8, 50, 20); //filename = Application.StartupPath + "\\Sample.xml"; //textBox1.Text= filename; //textBox1.SetBounds(64, 8, 256, 20); button1.Text = "Populate the TreeView with XML"; button1.SetBounds(8, 20, 200, 20); treeXml.Height = 600; treeXml.Width = 400; grpbox = new GroupBox(); grpbox.Height = 600; grpbox.Width = 400; grpbox.SetBounds(500, 2, 700, 600); grpbox.Visible = true; grpbox.Dock.Equals(Right); grpbox.Show(); this.Controls.Add(grpbox); //dom = new XPathDocument(dlg.FileName); } private void ConvertXmlNodeToTreeNode(XmlNode xmlNode, TreeNodeCollection treeNodes) { TreeNode newTreeNode = treeNodes.Add(xmlNode.Name); switch (xmlNode.NodeType) { case XmlNodeType.ProcessingInstruction: case XmlNodeType.XmlDeclaration: newTreeNode.Text = "<?" + xmlNode.Name + " " + xmlNode.Value + "?>"; break; case XmlNodeType.Element: if (xmlNode.Name.ToLower().Equals("node") == true) { newTreeNode.Text = "<" + xmlNode.Attributes["label"].Value.ToString() + ">"; } else newTreeNode.Text = "<" + xmlNode.Name + ">"; break; case XmlNodeType.Attribute: newTreeNode.Text = xmlNode.Name; // newTreeNode.Text = "ATTRIBUTE: " + xmlNode.Name; break; case XmlNodeType.Text: case XmlNodeType.CDATA: newTreeNode.Text = xmlNode.Value; break; case XmlNodeType.Comment: newTreeNode.Text = "<!--" + xmlNode.Value + "-->"; break; } if (xmlNode.Attributes != null) { foreach (XmlAttribute attribute in xmlNode.Attributes) { ConvertXmlNodeToTreeNode(attribute, newTreeNode.Nodes); } } foreach (XmlNode childNode in xmlNode.ChildNodes) { ConvertXmlNodeToTreeNode(childNode, newTreeNode.Nodes); } } private void treeXml_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { cnt = e.No

    C# html xml question

  • how to insert a new node in a tree view programatically?
    S samidhas

    i have textbox in which i can fill the values which should be updated into the treenode...?

    C# data-structures tutorial question

  • how to read filename?
    S samidhas

    thank a lot

    C# question xml tutorial

  • how to read filename?
    S samidhas

    hi, if i am using folloing code to open a perticular xml file, OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open XML File"; dlg.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*" ; if (dlg.ShowDialog() == DialogResult.OK) { doc.Load(dlg.OpenFile()); } and now if i want to read a file name in the xmltextreader , how can i read it?

    C# question xml tutorial

  • how to pass a value from an event to on button click?
    S samidhas

    oh that was simple yar....... thanks....

    C# question tutorial

  • how to pass a value from an event to on button click?
    S samidhas

    its not working bcoz i am using e.node which can be only possible in the treeview event not in the main class ..... am i right, plz guide me

    C# question tutorial

  • how to pass a value from an event to on button click?
    S samidhas

    hi friends , i want to pass a cnt value which is used in event to button click... how can i do it? -------------------------------------------------------------- private void treeXml_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e,e) { int cnt = e.Node.GetNodeCount(false); grpbox.Controls.Clear(); for (int i = 0; i < cnt; i++) { Label lbl = new Label(); TextBox txt = new TextBox(); //PictureBox img = new PictureBox(); lbl.Text = e.Node.Text; lbl.Left = 200; lbl.Top = 200 * i; txt.Left = 250; txt.Top = 200 * i; //img.left=300; //img.top=200 * i; lbl.Show(); txt.Show(); grpbox.Controls.Add(txt); grpbox.Controls.Add(lbl); //grpbox.Controls.Add(img); } } private void button2_Click(object sender, System.EventArgs e) { }

    C# question tutorial

  • xml and lable
    S samidhas

    ; if xml file is in this format then how can i get a lable name as a "holiday destinations on tree node? if xml is in the form < text> themn tex will be a lable of tree node.in this format. how can i get it?

    C# question data-structures xml

  • how to display the tree nodes and its atrributes in the list format in multiline textbox
    S samidhas

    hi, i have access a xml file in tree view, now i want to do .......... when i will click on any node on the tree view the all attributes of that tree node like ,pic, sound, text etc should be seen in another textbox(multiline). i have used trewview for this... how can i do this?

    C# question data-structures xml tutorial

  • how can i search a node in tree view?
    S samidhas

    its urgent plz help meeeeeeeee

    C# question data-structures xml

  • how can i acessthe xml file in c#?
    S samidhas

    plzzzzzz explain through code , i dint get you thanks

    C# question csharp xml

  • how can i acessthe xml file in c#?
    S samidhas

    i want to see a whole xml file in the richtext box. how can i see it or access it?

    C# question csharp xml

  • how can i search a node in tree view?
    S samidhas

    how can i programatically search node in the treeview? and if i am accessing xml file in treeview, then how can i search the node in xml file too?

    C# question data-structures xml

  • how can i access the xml file in the in richtextbox in c#.net?
    S samidhas

    how can i access the xml file in the in richtextbox in c#.net?

    C# csharp question xml

  • how to save ?
    S samidhas

    if i am accessing a xml file in c#, tree view. an if i delet the node from tree view an save it in original xml file, how can i save it? plzzzzzzz help me its urgunt.........

    C# question csharp data-structures xml help

  • how can i add a new node in treeview programatically ? and save changes?
    S samidhas

    how can i add a new node in treeview for an xml backend file? and save it?

    C# question xml
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups