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. C# DataGrid Question

C# DataGrid Question

Scheduled Pinned Locked Moved C#
questioncsharp
3 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.
  • K Offline
    K Offline
    kalyanPaladugu
    wrote on last edited by
    #1

    I want to add a new line to one of the Datagrid Column Value. How do i do it Suppose i have Mike and Bond and i want Mike and Bond in different lines but in the same column. Thanks Kal

    N 1 Reply Last reply
    0
    • K kalyanPaladugu

      I want to add a new line to one of the Datagrid Column Value. How do i do it Suppose i have Mike and Bond and i want Mike and Bond in different lines but in the same column. Thanks Kal

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello Correct me if I'm wrong, but I don't think it's possible. Regards:rose:

      V 1 Reply Last reply
      0
      • N Nader Elshehabi

        Hello Correct me if I'm wrong, but I don't think it's possible. Regards:rose:

        V Offline
        V Offline
        Vitaliy Tsvayer
        wrote on last edited by
        #3

        You can set DefaultCellStyle.WrapMode = DataGridViewTriState.True. So, you can enter value to cell as "Mike" + Environment.NewLine + "Bond". BUT, in this case if some other cell width is small its value will be wrapped as well. To avoid this you can leave DefaultCellStyle in its default value and set individual cell's style only.

        Vitaliy Tsvayer Tikle

        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