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. WPF
  4. populate datagrid using a list collection [modified]

populate datagrid using a list collection [modified]

Scheduled Pinned Locked Moved WPF
question
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.
  • A Offline
    A Offline
    arkiboys
    wrote on last edited by
    #1

    My list collection is populated with rows. Each row has fields... The datagrid only shows the first row in the list. Note that the datagrid.itemsSource does have the rows but only the first row is shown in the datagrid. Do you knoiw why please? gridMain.ItemsSource = results; Thanks

    modified on Tuesday, February 22, 2011 4:14 AM

    J A 2 Replies Last reply
    0
    • A arkiboys

      My list collection is populated with rows. Each row has fields... The datagrid only shows the first row in the list. Note that the datagrid.itemsSource does have the rows but only the first row is shown in the datagrid. Do you knoiw why please? gridMain.ItemsSource = results; Thanks

      modified on Tuesday, February 22, 2011 4:14 AM

      J Offline
      J Offline
      Jammer 0
      wrote on last edited by
      #2

      Not enough detail. What is in your collection? A

      DataTable

      DataRow

      or a custom DataRow object. What data grid are you using? I wouldn't bind a DataRow to a data grid in WPF ... have a look into MVVM.

      Jammer My Blog | Articles | DMon | SampleSort

      1 Reply Last reply
      0
      • A arkiboys

        My list collection is populated with rows. Each row has fields... The datagrid only shows the first row in the list. Note that the datagrid.itemsSource does have the rows but only the first row is shown in the datagrid. Do you knoiw why please? gridMain.ItemsSource = results; Thanks

        modified on Tuesday, February 22, 2011 4:14 AM

        A Offline
        A Offline
        amjad syed
        wrote on last edited by
        #3

        could the values for the first row is valid data and did u set datacontext property of the grid?

        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