Board index » delphi » Multi-Selection on a TDBGrid - Quick Help Needed

Multi-Selection on a TDBGrid - Quick Help Needed

Hi,

I am using a TDBGrid to show all my data from an Oracle database.
I've enabled the multi-select option on the grid so that user
can select multiple rows.  I noticed that only the ones with
entire row selected and a dot (.) on the indicator bar next to
the row means it's selected. at any point, I can use the
vertical scroll bar to jump to the next page or previous page.
then the cursor jumps also, which is fine, however, where-ever
the cursor is on, the first cell of that row is always selected
(highlighted), however, this row is not "selected", since the
dot is not next to the row.

how do I eliminate the highlighting of that first cell of that
current row where the cursor is on?  because it is rather mis-
leading to the user.

Thanks..
Jerri

 

Re:Multi-Selection on a TDBGrid - Quick Help Needed


Quote
"Jerri Chiu" <jerric...@yahoo.com> wrote in message

news:3e371d19$1@newsgroups.borland.com...

Quote

> I am using a TDBGrid to show all my data from an Oracle database.
> I've enabled the multi-select option on the grid so that user
> can select multiple rows.  I noticed that only the ones with
> entire row selected and a dot (.) on the indicator bar next to
> the row means it's selected. at any point, I can use the
> vertical scroll bar to jump to the next page or previous page.
> then the cursor jumps also, which is fine, however, where-ever
> the cursor is on, the first cell of that row is always selected
> (highlighted), however, this row is not "selected", since the
> dot is not next to the row.

> how do I eliminate the highlighting of that first cell of that
> current row where the cursor is on?  because it is rather mis-
> leading to the user.

You can take over the drawing of the cells by using the OnDrawColumnCell
event of the grid.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
"Democracy, without that guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman

Re:Multi-Selection on a TDBGrid - Quick Help Needed


Thanks much.. I got it..!

- Jerri

"Wayne Niddery [TeamB]" <wnidd...@chaff.aci.on.ca> wrote:

Quote
>"Jerri Chiu" <jerric...@yahoo.com> wrote in message
>news:3e371d19$1@newsgroups.borland.com...

>> I am using a TDBGrid to show all my data from an Oracle database.
>> I've enabled the multi-select option on the grid so that user
>> can select multiple rows.  I noticed that only the ones with
>> entire row selected and a dot (.) on the indicator bar next to
>> the row means it's selected. at any point, I can use the
>> vertical scroll bar to jump to the next page or previous page.
>> then the cursor jumps also, which is fine, however, where-ever
>> the cursor is on, the first cell of that row is always selected
>> (highlighted), however, this row is not "selected", since the
>> dot is not next to the row.

>> how do I eliminate the highlighting of that first cell of that
>> current row where the cursor is on?  because it is rather mis-
>> leading to the user.

>You can take over the drawing of the cells by using the OnDrawColumnCell
>event of the grid.

>--
>Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
>"Democracy, without that guarantee of liberty, is merely a method of
>selecting tyrants." - Alan Nitikman

Other Threads