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. ASP GridView in which Column Invisible [modified]

ASP GridView in which Column Invisible [modified]

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netquestion
5 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.
  • C Offline
    C Offline
    codingrocks
    wrote on last edited by
    #1

    I need a column in GridView to be invisible. I tried with some code and its throwing some error. Can anyone help me with this...?

    SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

    modified on Friday, June 27, 2008 2:58 AM

    E 1 Reply Last reply
    0
    • C codingrocks

      I need a column in GridView to be invisible. I tried with some code and its throwing some error. Can anyone help me with this...?

      SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

      modified on Friday, June 27, 2008 2:58 AM

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2
      A 1 Reply Last reply
      0
      • E eyeseetee
        A Offline
        A Offline
        Ariel Kazeed
        wrote on last edited by
        #3

        But now if you plan on do that then don't even think about recovering the cell's value on code behind. At least I've never been able to... :doh:

        Kazz


        "Users are there to click on things, not think. Let the archs do the damn thinking."

        E 1 Reply Last reply
        0
        • A Ariel Kazeed

          But now if you plan on do that then don't even think about recovering the cell's value on code behind. At least I've never been able to... :doh:

          Kazz


          "Users are there to click on things, not think. Let the archs do the damn thinking."

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          Ariel Kazeed wrote:

          ecovering the cell's value on code behind.

          What do you mean?

          We are not a Code Charity

          A 1 Reply Last reply
          0
          • E eyeseetee

            Ariel Kazeed wrote:

            ecovering the cell's value on code behind.

            What do you mean?

            We are not a Code Charity

            A Offline
            A Offline
            Ariel Kazeed
            wrote on last edited by
            #5

            I mean something like...

            //Assume First Gridview column is not visible
            Integer ID = Gridview.Cells[0].Text

            That would throw an exception. Yes, ASP.NET knows there is a column there even though you cannot see it. Problem is, since the value of that particular column is not printed on the page, it only exists at databinding time. Hence, in this case GridView.Cells[0].Text returns "", that's what I meant.

            Kazz


            "Users are there to click on things, not think. Let the archs do the damn thinking."

            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