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 <-> PropertyGrid data binding

DataGridView <-> PropertyGrid data binding

Scheduled Pinned Locked Moved C#
questioncsharpcsswpfwcf
1 Posts 1 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.
  • R Offline
    R Offline
    rbuchana
    wrote on last edited by
    #1

    Any and all, Try not to flame me, I'm a EE that writes C# sparingly, so go easy on me. I have an application with a property grid and a data grid view. The data grid represents a register table of an ASIC. A register location inside the ASIC controls some portion of the ASIC. The property grid contains the same control as the register table, only in a more easy to use manner, as you can imagine. The user can alter a property which in turn writes a register in the ASIC, this register change fires the data grid to update, via reading all the registers in the ASIC. The reverse is also possible: the user may manually change a register which updates the data grid and then the property grid is updated. If I explained myself well enough, the data grid and property grids are tied together via control of the ASIC. Currently, if a property is changed I have a big case statement with the property name as the switch. Depending on which property is updated I then alter the specific register. Currently, if a register is manually written (via the data grid) I have another big case statement with the register address as the switch. I then update the necessary property in the property grid. My question is there must be a better way of doing this. As you can imagine every time I port my software to a new or different ASIC I have to re-write ~1000 lines of code. Also a property can affect multiple registers, which in turn can affect other properties, i.e. Prop A Changed->Write Register B, C, & D->Update data grid->Register D Changed->Update property A & E->etc. These "callbacks" can get long & slow down my application. What can I do to make this process more seemless? FYI I can't completely remove the data grid view, because of other reasons, even though I believe users use the PropertyGrid > 98% of the time. Thanks, --RB

    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