CGridCtrl Add & Delete UI
-
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.