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. How to Bind a gridview to a datatable without a tableAdapter

How to Bind a gridview to a datatable without a tableAdapter

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdesigntutorialquestion
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.
  • G Offline
    G Offline
    Glen Harvy 0
    wrote on last edited by
    #1

    Hi, I'm new to web development and asp.net and can't figure this one out. I've manually created a datatable in my dataset.xsd page and now I want to bind a gridview to that datatable. I need to do this so I can design the gridview at design time and manipulate it at runtime. I will be populating the datatable at runtime as well. I can't see how to create a suitable datasource to link to the table? Can someone point me in the right direction please. Obviously I'm coming from a forms background. Thanks.

    Glen Harvy

    S 1 Reply Last reply
    0
    • G Glen Harvy 0

      Hi, I'm new to web development and asp.net and can't figure this one out. I've manually created a datatable in my dataset.xsd page and now I want to bind a gridview to that datatable. I need to do this so I can design the gridview at design time and manipulate it at runtime. I will be populating the datatable at runtime as well. I can't see how to create a suitable datasource to link to the table? Can someone point me in the right direction please. Obviously I'm coming from a forms background. Thanks.

      Glen Harvy

      S Offline
      S Offline
      S Dhanasekaran
      wrote on last edited by
      #2

      Hi, using a Gridview "id" to bind the data. For example, GridviewID.DataSource = ObjectDataTable; GridviewID.DataBind();

      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