Solved

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

Posted on 2004-09-12
7
206 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi with SQL Natvie Client 15 86
Find and Replace Stream with 0s 8 56
Delphi and Access based Enumeration 9 47
I want to use librsync in my Delphi backup application. 3 27
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now