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. General Programming
  3. .NET (Core and Framework)
  4. Customizing Coloumns in DataGridView in VS 2008

Customizing Coloumns in DataGridView in VS 2008

Scheduled Pinned Locked Moved .NET (Core and Framework)
visual-studiotutorial
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.
  • A Offline
    A Offline
    AS 13
    wrote on last edited by
    #1

    Hello Everybody, Hope all are doing well. I have an application where I have to show data in a gridview. I want that when user scroll the horizontal scrollbar first 3 columns should not be scrolled i.e. first 3 columns should always shown like we shown the header of the gridview to the user always at the time of vertical scrolling. Like this also I want a row in the bottom should always shown to the user(it could be the footer).Plz send me the sample if u have otherwise tell me how to achieve this. Thanks in Advance. Happy Coding!!!!!!

    A key to every Solution

    D 1 Reply Last reply
    0
    • A AS 13

      Hello Everybody, Hope all are doing well. I have an application where I have to show data in a gridview. I want that when user scroll the horizontal scrollbar first 3 columns should not be scrolled i.e. first 3 columns should always shown like we shown the header of the gridview to the user always at the time of vertical scrolling. Like this also I want a row in the bottom should always shown to the user(it could be the footer).Plz send me the sample if u have otherwise tell me how to achieve this. Thanks in Advance. Happy Coding!!!!!!

      A key to every Solution

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Both the DataGridViewColumn and DataGridViewRow classes expose a Frozen property that does this. All you have to do is set the Frozen property of the columns you want not to scroll.

      myDGV.Columns(0).Frozen = True
      

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      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