TDBAdvGri and DisjunctRowSelect

Hello,

I have a problem with DisjunctRowSelect property. I want to have a multiselect row after CTRL is pressed and mouse click. I set DisjunctRowSelect to true and when I click to some row without CTRL, row don't repaint. I resolved this problem added method:
procedure TfrmGlowna.adbgZadaniaRowDisjunctSelected(Sender: TObject;
  ARow: Integer);
begin
  if (adbgZadania.RowSelectCount = 1) then
    adbgZadania.RepaintRow(ARow);
end;

It's work but when I press key down or up, my selection range was change. I want to use this key only to move, some like click mouse without CTRL on next row.

Thanks for Your help.
Przemek

Did you set grid.PageMode = false?

No, becouse I have a lot of data in my dataset. My query return over 20000 records so I can't use PageMode set True.
Przemek

In order for disjunct row selection to work, the grid must hold all rows, hence , PageMode should be false.

We use DbAdvGrid in PageMode due to large amount of data (more than 20000). To
manage those data we need functionality to select multiple rows using CTRL key +
keys (arrows) and CTRL + mouse also will be nice to have area selection with
Shift key and mouse.
Those selection options works when we enable
DisjunctRowSelect but with this option enabled when we select multiple rows and
scroll down/up grid content (with arrows or with mouse scroll) the selectetions
freezes on grid and data scrolls under selected rows. In this case grid is
unusable.
Please help us solve this  issue. It`s essential functionality for
our application.

Przemek

The built-in disjunct row selection requires that grid.PageMode = false.

If you have a requirement to use grid.PageMode = true, you'd need to keep the list of selected rows on application level, for example by keeping a list of bookmarks and use this for example from the OnGetCellColor event to set the background cell color to selection color for rows with a bookmark in your bookmark list.