c++c++builderstringgrid

How to enable multiple row selection into a TStringGrid


I'm using C++Builder and I can't select multiple rows of my TStringGrid with the mouse.

Is there a particular property of TStringGrid that enable this?


Solution

  • Enable the goRangeSelect and goRowSelect flags in the TStringGrid::Options property.

    goRangeSelect
    Users can select ranges of cells at one time. goRangeSelect is ignored if Options includes goEditing.

    goRowSelect
    Entire rows are selected rather than individual cells. If goRowSelect is included in Options, goAlwaysShowEditor has no effect.