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. Datagrid without a Table

Datagrid without a Table

Scheduled Pinned Locked Moved C#
question
2 Posts 2 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.
  • N Offline
    N Offline
    Nooie
    wrote on last edited by
    #1

    I think you can't have a Datagrid with out a table. But what I want to do is get a list of Jgp files on my computer and display them in a list, with a tick box, a preview of the JPG and a text box with the path. What would be the best way to present this as a list on screen? Sorry if this seems an easy question. Tony

    T 1 Reply Last reply
    0
    • N Nooie

      I think you can't have a Datagrid with out a table. But what I want to do is get a list of Jgp files on my computer and display them in a list, with a tick box, a preview of the JPG and a text box with the path. What would be the best way to present this as a list on screen? Sorry if this seems an easy question. Tony

      T Offline
      T Offline
      tgrt
      wrote on last edited by
      #2

      You can create a DataGridView without a datasource by manually adding columns and rows. However, using some type of datasource is going to be your best bet. Create a class to represent your image specifics and then create a typed collection for your class. Set the datasource of the data grid to your collection. I use a 3rd party grid so you may have some slightly different steps, but this is the meat of it. (For example, you may have to dump the collection into a BindingSource -- I'm not sure though.)

      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