Select arbitrary range of cells

Originally Posted 6 March 2012, 7:52 pm EST

  • Originally Posted 6 March 2012, 7:52 pm EST

    I'm writing an MFC application with True DBGrid 8.0, and I'd like for the user to be able to select an arbitrary range of cells (i.e. not full row), with ctrl and shift functionality like excel. I can't seem to get this behavior. I've seen several mentions of excel-like cell selection in the sales materials, but I haven't been able to implement it. Can you point me in the right direction? If it isn't implemented, I'm thinking I can't be the first to have this issue, is there a snippet of code to handle this?
  • Reply

    Hi,

    You may use the SelRange, SelBookmarks, SelStartCol and SelEndCol properties to get the
    desired result.

    I've attached a sample that might help you in achieving the desired functionality

    Regards,
    ~Gatim
    2012/03/Selecting_Multiple_Rows_Using_Bookmark.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels