CRDBGrid problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Leonid
Posts: 24
Joined: Wed 26 Oct 2005 12:59

CRDBGrid problem

Post by Leonid » Mon 04 Jun 2007 13:42

We are using CRDBgrid in many places in our Delphi applications to show data from database. I found strange grid behaviour in case when grid working in multiselect mode. For some internal validations we are using property Grid.SelectedRows.Count. I found that when grid line was selected by mouse click Grid.SelectedRows.Count=1. But when grid line was selected by arrow up/down button Grid.SelectedRows.Count=0. Also selection symbol in 0 column different. Because we are using such validation in many places this behaviour makes inconsistence in validation. Can you help me forcing the grid working same regardless of the row selection kind?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 05 Jun 2007 08:17

When you are navigating through the grid using Up and Down arrows, the grid highlights the current row in the dataset. But it does not consider that this row is selected. The TCRDBGrid component supports selecting rows by mouse only.

The TCRDBGrid component inherit this behaviour from its base class TCustomDBGrid. There is no easy way for you to change it.

Post Reply