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. Problem with gridview

Problem with gridview

Scheduled Pinned Locked Moved C#
jsonhelp
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
    abhi291984
    wrote on last edited by
    #1

    Hi All, I need to bind the table data in gridview with some alteration. I have table like below Table structure Application 1-NA RED Comment Application 1-LN Amber Comment Application1 -ZU Green Comment Application 1-NA RED Comment Application 1-LN Amber Comment Application1 -ZU Green Comment I want to cut the application name and want to put as a separate column (heading) and rest of part as region. And bind it with datagrid. Logic or sample of code would be appreciated. I am looking for gridview like below Application 1 NA Red Comment LN Amber Comment ZU Green Comment Application 2 NA Red Comment LN Amber Comment ZU Green Comment

    M 1 Reply Last reply
    0
    • A abhi291984

      Hi All, I need to bind the table data in gridview with some alteration. I have table like below Table structure Application 1-NA RED Comment Application 1-LN Amber Comment Application1 -ZU Green Comment Application 1-NA RED Comment Application 1-LN Amber Comment Application1 -ZU Green Comment I want to cut the application name and want to put as a separate column (heading) and rest of part as region. And bind it with datagrid. Logic or sample of code would be appreciated. I am looking for gridview like below Application 1 NA Red Comment LN Amber Comment ZU Green Comment Application 2 NA Red Comment LN Amber Comment ZU Green Comment

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Add another column to your datatable (I would do this in the select statement) and calculate the short name. In your datagrid do not bind the full name field (or hide it by setting the width to 0)

      Never underestimate the power of human stupidity RAH

      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