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. removing the empty column in a datagrid

removing the empty column in a datagrid

Scheduled Pinned Locked Moved ASP.NET
cssperformancehelp
6 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.
  • P Offline
    P Offline
    Prakash_Mishra
    wrote on last edited by
    #1

    HI ALL In my asp application i have a data grid, can i hide the empty columns in run time. like i am accessing the values from same table for the 2 categories ie in case of software there is data in key skill column the other two fields process and typing speed are empty, same way for BPO category only typing speed data is there other two fields key skill and process is empty. so i just want the columns which is having data Pl help Regards

    Prakash Mishra(Banglore,India)

    I 1 Reply Last reply
    0
    • P Prakash_Mishra

      HI ALL In my asp application i have a data grid, can i hide the empty columns in run time. like i am accessing the values from same table for the 2 categories ie in case of software there is data in key skill column the other two fields process and typing speed are empty, same way for BPO category only typing speed data is there other two fields key skill and process is empty. so i just want the columns which is having data Pl help Regards

      Prakash Mishra(Banglore,India)

      I Offline
      I Offline
      Imran Khan Pathan
      wrote on last edited by
      #2

      R u taking one column or three column to display data in datagrid? Best Regard Pathan

      ---------------------------------------------------

      P 1 Reply Last reply
      0
      • I Imran Khan Pathan

        R u taking one column or three column to display data in datagrid? Best Regard Pathan

        ---------------------------------------------------

        P Offline
        P Offline
        Prakash_Mishra
        wrote on last edited by
        #3

        as i am displaying all catories in same datagrid i need to take all columns. I only want to hide it if its empty

        Prakash Mishra(Banglore,India)

        V 1 Reply Last reply
        0
        • P Prakash_Mishra

          as i am displaying all catories in same datagrid i need to take all columns. I only want to hide it if its empty

          Prakash Mishra(Banglore,India)

          V Offline
          V Offline
          Vipul Mehta
          wrote on last edited by
          #4

          Implement following logic: dgrd.Columns(i).Visible = False Note: i represents column index

          Regards, Vipul Mehta Sr. Software Engineer Accenture Services Pvt Ltd

          P 1 Reply Last reply
          0
          • V Vipul Mehta

            Implement following logic: dgrd.Columns(i).Visible = False Note: i represents column index

            Regards, Vipul Mehta Sr. Software Engineer Accenture Services Pvt Ltd

            P Offline
            P Offline
            Prakash_Mishra
            wrote on last edited by
            #5

            Thanks Actually now how i solved is i took three data grid and made it visible according to my need, any way ur solution is smarter. Thanks a lot

            Prakash Mishra(Banglore,India)

            V 1 Reply Last reply
            0
            • P Prakash_Mishra

              Thanks Actually now how i solved is i took three data grid and made it visible according to my need, any way ur solution is smarter. Thanks a lot

              Prakash Mishra(Banglore,India)

              V Offline
              V Offline
              Vipul Mehta
              wrote on last edited by
              #6

              Ur solution will work fine but this will make ur page quite bulky & also will increase the redundancy of ur logic. From maintainance perspective ur solution might proved to be bit dicy.

              Regards, Vipul Mehta Sr. Software Engineer Accenture Services Pvt Ltd

              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