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

In multiselect mode, how to prevent multiselection on columns, but allow multiselection on rows?

Thanks in advance
setankabirAsked:
Who is Participating?
 
JaccoConnect With a Mentor Commented:
Oops, sorry. The event is not available on the DBGrid. What you ask is not possible with a DBGrid.
0
 
JaccoCommented:
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
 
setankabirAuthor Commented:
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
setankabirAuthor Commented:
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
 
JaccoCommented:
What version of delphi?

Regards Jacco
0
 
setankabirAuthor Commented:
I've been using Delphi 7.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.