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. Windows Forms
  4. Lookup in DataGridView

Lookup in DataGridView

Scheduled Pinned Locked Moved Windows Forms
questioncssdatabasewpfwcf
1 Posts 1 Posters 3 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.
  • B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #1

    I am using a DataGridView as an EventLog viewer. At the moment I just bind it to a DataTable I get from my LogQuery class. However, one of the columns is EventType, an integer, but I would like to transform this to the descriptions corresponding to event types, such as Error, Information, Warning, etc. I can't change the query used by the LoqQuery to include a join, as the data provider doesn't support this. Short of iterating the DataTable result, changing one column from int to string, and doing the lookup there, I have to do the lookup transform in the grid. I think a good start is switching off auto-creating columns and manually binding columns, then I can insert an extra column and do some slights of hand. This is the crux of my question: what can I do here? An expression column, handling a populating event and doing a lookup, iterating the grid and fixing everything once populated, etc.

    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