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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Dataset with 6 columns, how to display only 3 in a data grid?

Dataset with 6 columns, how to display only 3 in a data grid?

Scheduled Pinned Locked Moved C#
csharpcssasp-nettutorialquestion
4 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.
  • J Offline
    J Offline
    jeweladdict
    wrote on last edited by
    #1

    I found the asp.net answer, but it can't be applied to c#. Anyone know of a way to do this without creating a 2nd dataset to store it in?

    W P 2 Replies Last reply
    0
    • J jeweladdict

      I found the asp.net answer, but it can't be applied to c#. Anyone know of a way to do this without creating a 2nd dataset to store it in?

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      One way is to use DataGridColumnStyle Class[^]

      The need to optimize rises from a bad design. My articles[^]

      1 Reply Last reply
      0
      • J jeweladdict

        I found the asp.net answer, but it can't be applied to c#. Anyone know of a way to do this without creating a 2nd dataset to store it in?

        P Offline
        P Offline
        Priya Prk
        wrote on last edited by
        #3

        You can hide those columns through the datagrid properties

        J 1 Reply Last reply
        0
        • P Priya Prk

          You can hide those columns through the datagrid properties

          J Offline
          J Offline
          jeweladdict
          wrote on last edited by
          #4

          H:\AllBrite\AllBrite\Form1.cs(3702): 'System.Windows.Forms.DataGrid' does not contain a definition for 'Columns' using framework 1.1...

          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