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
  1. Home
  2. General Programming
  3. C#
  4. Hashtables and DataGridView

Hashtables and DataGridView

Scheduled Pinned Locked Moved C#
csharpcssvisual-studiotutorialquestion
3 Posts 3 Posters 0 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.
  • B Offline
    B Offline
    Baconbutty
    wrote on last edited by
    #1

    Am suffering brain melt :( Just in a bog-standard C# Windows App. Could anyone show me how to get the DataGridView to actually show my values please? I thought this code would work but it shows no values in the grid. DataGridView dataGridView1 = new DataGridView(); BindingSource bindingSource1 = new BindingSource(); dataGridView1.AutoGenerateColumns = true; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; bindingSource1.DataSource = myHashtable; dataGridView1.DataSource = bindingSource1; myHashtable has 129 rows and 2 columns. Thanks in advance.

    I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

    J M 2 Replies Last reply
    0
    • B Baconbutty

      Am suffering brain melt :( Just in a bog-standard C# Windows App. Could anyone show me how to get the DataGridView to actually show my values please? I thought this code would work but it shows no values in the grid. DataGridView dataGridView1 = new DataGridView(); BindingSource bindingSource1 = new BindingSource(); dataGridView1.AutoGenerateColumns = true; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; bindingSource1.DataSource = myHashtable; dataGridView1.DataSource = bindingSource1; myHashtable has 129 rows and 2 columns. Thanks in advance.

      I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

      J Offline
      J Offline
      James Bond 007
      wrote on last edited by
      #2

      No Problmes. It is working .... and should work at yourend too

      B O N D

      1 Reply Last reply
      0
      • B Baconbutty

        Am suffering brain melt :( Just in a bog-standard C# Windows App. Could anyone show me how to get the DataGridView to actually show my values please? I thought this code would work but it shows no values in the grid. DataGridView dataGridView1 = new DataGridView(); BindingSource bindingSource1 = new BindingSource(); dataGridView1.AutoGenerateColumns = true; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; bindingSource1.DataSource = myHashtable; dataGridView1.DataSource = bindingSource1; myHashtable has 129 rows and 2 columns. Thanks in advance.

        I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

        M Offline
        M Offline
        mmikey7
        wrote on last edited by
        #3

        Can you see any datagrid at all? I do not see line where you add dataGridView1 to Controls collection. Just a hint.

        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