Solved

How to prevent multiselection on columns, but allow multiselection on rows?

Posted on 2004-09-12
7
207 Views
Last Modified: 2010-04-05
In multiselect mode, how to prevent multiselection on columns, but allow multiselection on rows?

Thanks in advance
0
Comment
Question by:setankabir
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:Jacco
ID: 12041258
If it is for a normal grid you could do something like this

procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol,  ARow: Integer; var CanSelect: Boolean);
begin
  CanSelect := ACol = YourCol;
end;

Regards Jacco
0
 

Author Comment

by:setankabir
ID: 12053317
I think that approach also won't highlight the fixed-row (in the most left part of DBGrid) as when we manually hold ctrl key and click the fixed-row to select rows.
0
 

Author Comment

by:setankabir
ID: 12053342
I'm so sorry, that is a wrong post. Actually I want to post it in another topic.

My real comment is ... ... ...,
My type of grid is DBGrid. I didn't find a OnSelectCell event in DBGrid.

What should I do now?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 10

Expert Comment

by:Jacco
ID: 12053383
What version of delphi?

Regards Jacco
0
 

Author Comment

by:setankabir
ID: 12071813
I've been using Delphi 7.
0
 
LVL 10

Accepted Solution

by:
Jacco earned 50 total points
ID: 12072251
Oops, sorry. The event is not available on the DBGrid. What you ask is not possible with a DBGrid.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
build html 5 client that connect to indy Tidtcpserver 3 404
Delphi XE2 application frozen on Windows 10 10 320
Downloading email attachments 2 74
Wincontrol not (correctly) drawn 15 38
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question