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 / C++ / MFC
  4. CGridCtrl Add & Delete UI

CGridCtrl Add & Delete UI

Scheduled Pinned Locked Moved C / C++ / MFC
designhelpquestioncode-review
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.
  • S Offline
    S Offline
    Sam Hobbs
    wrote on last edited by
    #1

    Is there a common method of providing a UI for adding and deleting rows in a CGridCtrl? I can certainly develop various solutions but I wanted to check to see if there is something useful that already exists. For adding, one solution is to always have the bottom row be empty and available for adding an entry, such as what MS Access does for tables. Is that a solution that is commonly used? If so then I can probably figure it out easily enough. For deleting, one solution is to implement a context-menu. I assume it is easy enough to determine the row that the click is in. Another solution is to allow the Delete key to provide that capability and/or a Delete button. I have implemented code that determines if a cell, but only one cell, is selected. I should improve it to allow as multiple cells to be selected, as long as it is for one row. However it would help to have an option that permits only a single row to be selected. There appears to be an option for that but the option requires "List mode" and I have not become familiar with that. If I can't use that then I hope there is a way to catch the event of the change in selection and to provide single-row selection that way.

    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