Solved

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

Posted on 2004-09-12
7
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

696 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