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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. someone who can help me!!

someone who can help me!!

Scheduled Pinned Locked Moved C#
helpquestion
9 Posts 5 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    miss YY
    wrote on last edited by
    #1

    foreach (DataRow dr in ds.Tables[0])
    {
    string colName = dr["a"].ToString();
    TreeNode node = treeView1.Find(colName);
    if (node == null)
    {
    node = treeView1.Nodes.Add(colName, colName);
    }
    node.Nodes.Add(dr["b"].ToString());
    }

    when runing the code it shows: "System.Windows.Forms.TreeView" does not contain a "Find" Definition? can someone help me very thanks!!@

    M L C P 4 Replies Last reply
    0
    • M miss YY

      foreach (DataRow dr in ds.Tables[0])
      {
      string colName = dr["a"].ToString();
      TreeNode node = treeView1.Find(colName);
      if (node == null)
      {
      node = treeView1.Nodes.Add(colName, colName);
      }
      node.Nodes.Add(dr["b"].ToString());
      }

      when runing the code it shows: "System.Windows.Forms.TreeView" does not contain a "Find" Definition? can someone help me very thanks!!@

      M Offline
      M Offline
      miss YY
      wrote on last edited by
      #2

      im online waiting!

      C M 2 Replies Last reply
      0
      • M miss YY

        foreach (DataRow dr in ds.Tables[0])
        {
        string colName = dr["a"].ToString();
        TreeNode node = treeView1.Find(colName);
        if (node == null)
        {
        node = treeView1.Nodes.Add(colName, colName);
        }
        node.Nodes.Add(dr["b"].ToString());
        }

        when runing the code it shows: "System.Windows.Forms.TreeView" does not contain a "Find" Definition? can someone help me very thanks!!@

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Yes, TreeView doesn't have method "Find". http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview_methods.aspx[^]

        1 Reply Last reply
        0
        • M miss YY

          foreach (DataRow dr in ds.Tables[0])
          {
          string colName = dr["a"].ToString();
          TreeNode node = treeView1.Find(colName);
          if (node == null)
          {
          node = treeView1.Nodes.Add(colName, colName);
          }
          node.Nodes.Add(dr["b"].ToString());
          }

          when runing the code it shows: "System.Windows.Forms.TreeView" does not contain a "Find" Definition? can someone help me very thanks!!@

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          You should read the post on how to ask a question. 'someone who can help me' is hardly descriptive. The error message means what it says, the tree view does NOT have a Find method. looking at your posts, I wonder if you're copying code at random off the web, and if you have any idea what any of it means. Surely you can use google, read your references, etc, or even use intellisense to work out that there is indeed no find method on a treeview ? The Nodes property of a TreeView has a Find method. I sure hope this is homework, because no-one should be paying for this code. You should talk to your teacher and let them know that you're confused and incapable of searching the web or reading documentation, so they can make a recommendation about your future viability in this course.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          • M miss YY

            im online waiting!

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            miss YY wrote:

            im online waiting!

            you are incredibly rude. You waited two minutes and thought you'd demand an answer to a question my 9 year old could have worked out ( he knows how to use google ). If you want instant help, pay for it. Especially when you're too lazy to do any research or think about your code, you have no right to demand an answer from us, certainly not within two minutes.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            1 Reply Last reply
            0
            • M miss YY

              im online waiting!

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              And you expect that to get you an answer, thank God your not from India it would have led to so many steriotypes. Read the guidelines at the top of the page, no doubt you have been told this before and ignored it.

              1 Reply Last reply
              0
              • M miss YY

                foreach (DataRow dr in ds.Tables[0])
                {
                string colName = dr["a"].ToString();
                TreeNode node = treeView1.Find(colName);
                if (node == null)
                {
                node = treeView1.Nodes.Add(colName, colName);
                }
                node.Nodes.Add(dr["b"].ToString());
                }

                when runing the code it shows: "System.Windows.Forms.TreeView" does not contain a "Find" Definition? can someone help me very thanks!!@

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                It should actually be treeView1.Nodes.Find. When I posted the code sample the other day, I just typed it directly into the editor so there were bound to be mistakes. A bit of logical thought would have told you where the Find method for Nodes would actually be. If you want to continue as a developer, you need to be able to analyse a problem to work out what solutions to problems are likely to be and where you need to look for them.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                C 1 Reply Last reply
                0
                • P Pete OHanlon

                  It should actually be treeView1.Nodes.Find. When I posted the code sample the other day, I just typed it directly into the editor so there were bound to be mistakes. A bit of logical thought would have told you where the Find method for Nodes would actually be. If you want to continue as a developer, you need to be able to analyse a problem to work out what solutions to problems are likely to be and where you need to look for them.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  Shame on you Pete, YOUR code was broken and now WE needed to fix it so she could pass her class.....

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  P 1 Reply Last reply
                  0
                  • C Christian Graus

                    Shame on you Pete, YOUR code was broken and now WE needed to fix it so she could pass her class.....

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #9

                    I'm surprised she actually tried it. :rolleyes:

                    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                    My blog | My articles | MoXAML PowerToys | Onyx

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

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