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. Web Development
  3. ASP.NET
  4. Gridview binding issue

Gridview binding issue

Scheduled Pinned Locked Moved ASP.NET
tutorialcsswpfwcfjson
3 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.
  • M Offline
    M Offline
    mpavas
    wrote on last edited by
    #1

    I am trying to bind a nested gridview in a loop. But what happens is I get only the last record on the grid. Rest all previous records get disappear. for example: for 1 = 1 to 10 ResultsDataGrid.DataSource = Results; ResultsDataGrid.DataBind(); In this case I only see the 10 th record. Please suggest or guide

    Regards, Pavas

    M 1 Reply Last reply
    0
    • M mpavas

      I am trying to bind a nested gridview in a loop. But what happens is I get only the last record on the grid. Rest all previous records get disappear. for example: for 1 = 1 to 10 ResultsDataGrid.DataSource = Results; ResultsDataGrid.DataBind(); In this case I only see the 10 th record. Please suggest or guide

      Regards, Pavas

      M Offline
      M Offline
      Muhammad Gouda
      wrote on last edited by
      #2

      Why use a loop ??!! Just Bind directly

      ResultsDataGrid.DataSource = Results;
      ResultsDataGrid.DataBind();

      foreach(Minute m in MyLife) myExperience++;

      M 1 Reply Last reply
      0
      • M Muhammad Gouda

        Why use a loop ??!! Just Bind directly

        ResultsDataGrid.DataSource = Results;
        ResultsDataGrid.DataBind();

        foreach(Minute m in MyLife) myExperience++;

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

        Got the solution. I made a relation datatable and then used it. thanks

        Regards, Pavas

        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