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 add gridview to placeholder

How to add gridview to placeholder

Scheduled Pinned Locked Moved ASP.NET
helptutorial
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.
  • S Offline
    S Offline
    scjsb
    wrote on last edited by
    #1

    I have created a simple gridview in my aspx file and tried to add this gridview to a placeholder in the aspx.cs file, but it does not work. To control the placeholder I am using a sytle sheet. If I create the gridview in the aspx.cs file, then add it to the placeholder it does work. Code snippets are below. All I want to do, is add gridviews to placeholders, which seems simple enough. Any help is appreciated. Created gridview in aspx file as:

    C 1 Reply Last reply
    0
    • S scjsb

      I have created a simple gridview in my aspx file and tried to add this gridview to a placeholder in the aspx.cs file, but it does not work. To control the placeholder I am using a sytle sheet. If I create the gridview in the aspx.cs file, then add it to the placeholder it does work. Code snippets are below. All I want to do, is add gridviews to placeholders, which seems simple enough. Any help is appreciated. Created gridview in aspx file as:

      C Offline
      C Offline
      Cybernate
      wrote on last edited by
      #2

      You should be able to do it without any problems. Are you getting any error? but if you are dynamically changing the hierarchy of controls on apage they can;t make use of the View State. Let me know whatz the problem you are facing.

      Regards, Cybernate

      S 1 Reply Last reply
      0
      • C Cybernate

        You should be able to do it without any problems. Are you getting any error? but if you are dynamically changing the hierarchy of controls on apage they can;t make use of the View State. Let me know whatz the problem you are facing.

        Regards, Cybernate

        S Offline
        S Offline
        scjsb
        wrote on last edited by
        #3

        There are no errors, the gridview has the correct data, except the gridview is not is the placeholder, it is where I have positioned the gridview on the form. If I create the gridview in the aspx.cs page, then it works. Thanks

        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