See the attached pic, it shows the Outlook Inbox. What I want to do is to get the same behaviour in GDBG when selecting rows/showing the context menu. In Outlook, I can have a selected row and whem I do a right click on another row it becomes a pointed line around the border and the context menu''s action are for this row. How can I do this in GDBG?
Here is a roght sample. You set the selections to only repsond to the left mouse button (so that right-clicking does not affect the exisiting selections).
Then in the grid''s mouseup, you can display the menu and act on it. To dot the row, you can set a rowIndex flag, and call grid.RefreshRange so the row is redrawn. In PrepareViewStyleInfo, you can set the borders on this row to be dotted. If you do not like the way this looks, instead of PrepareViewStyleInfo, you can handle CellDrawn, and there if it is a cell in your row being drawn, then decorate the cell in any manner you want. Here is a little sample.
AdministratorMarch 23, 2004 11:33 AM UTC
Works perfect, thanks alot.