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. C#
  4. adding columns to grid view programatically

adding columns to grid view programatically

Scheduled Pinned Locked Moved C#
cssdesignquestion
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.
  • S Offline
    S Offline
    scotchy2hotty2k2
    wrote on last edited by
    #1

    Hi all I want to create a grid view control which inherits from grid view. Now after i bind it datasource i want to hide some columns from gridview. also i want to add some controls like checkbox ,dropdownlist. How do i do this programatically.i dont want to do this using design view. Please suggest which methods should i override and how do i create template here.. Waiting for answer Tejesh

    M 1 Reply Last reply
    0
    • S scotchy2hotty2k2

      Hi all I want to create a grid view control which inherits from grid view. Now after i bind it datasource i want to hide some columns from gridview. also i want to add some controls like checkbox ,dropdownlist. How do i do this programatically.i dont want to do this using design view. Please suggest which methods should i override and how do i create template here.. Waiting for answer Tejesh

      M Offline
      M Offline
      MadArtSoft
      wrote on last edited by
      #2

      Try this: DataGridViewCheckBoxColumn col = new DataGridViewCheckBoxColumn(); col. (fill the properties) dataGridView1.Columns.Add(col);

      C# controls, .Net components. Help Desk Software

      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