Solved

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

Posted on 2004-09-12
7
205 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 10

Expert Comment

by:Jacco
Comment Utility
What version of delphi?

Regards Jacco
0
 

Author Comment

by:setankabir
Comment Utility
I've been using Delphi 7.
0
 
LVL 10

Accepted Solution

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

16 Experts available now in Live!

Get 1:1 Help Now