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. datagridview question, plz help

datagridview question, plz help

Scheduled Pinned Locked Moved C#
questionhelp
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.
  • A Offline
    A Offline
    akkram
    wrote on last edited by
    #1

    Hi, Im trying to change the look/style of my datagridview control. Is there a way to change the color, border etc for specific cells. Id like every cell that doesnt contain any data to have the same color as my form without any border and cells containing data to have a white background and sunken into the form so that they appear as normal textboxes?

    P J 2 Replies Last reply
    0
    • A akkram

      Hi, Im trying to change the look/style of my datagridview control. Is there a way to change the color, border etc for specific cells. Id like every cell that doesnt contain any data to have the same color as my form without any border and cells containing data to have a white background and sunken into the form so that they appear as normal textboxes?

      P Offline
      P Offline
      phantanagu
      wrote on last edited by
      #2

      Hi, Maybe the answer for your problem is no. Datagridview doesn't still support for formatting any discrete cells. DefaultGridCellStyle property is designed to format a column or all columns of datagridview.

      It seem to be a solution or an answer.

      A 1 Reply Last reply
      0
      • P phantanagu

        Hi, Maybe the answer for your problem is no. Datagridview doesn't still support for formatting any discrete cells. DefaultGridCellStyle property is designed to format a column or all columns of datagridview.

        It seem to be a solution or an answer.

        A Offline
        A Offline
        akkram
        wrote on last edited by
        #3

        So im not able to change the border for a single cell but for a specific column? how do you do that? /thanks

        1 Reply Last reply
        0
        • A akkram

          Hi, Im trying to change the look/style of my datagridview control. Is there a way to change the color, border etc for specific cells. Id like every cell that doesnt contain any data to have the same color as my form without any border and cells containing data to have a white background and sunken into the form so that they appear as normal textboxes?

          J Offline
          J Offline
          Jaiprakash M Bankolli
          wrote on last edited by
          #4

          Certainly you can change the color of each cell in row databound event !!! you can access these information and set the proper color

          Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com http://jaiprakash.blog.com/

          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