Solved

How to prevent multiselection on columns, but allow multiselection on rows in DBGrid

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

Thanks in advance


Actually I have asked this question, but nothing can answer it. So, I increase the difficulty point.
0
Comment
Question by:setankabir
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:Amir Azhdari
ID: 12093131
just add a line to  oncreate event of your form :

procedure TForm1.FormCreate(Sender: TObject);
begin
tstringgrid(dbgrid1).Options:=[goFixedVertLine,goFixedHorzLine,goVertLine,goHorzLine,goRangeSelect,goColSizing,goThumbTracking];
end;

Regards
Azhdari
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 12093155
By Object Inspector
 Property: - Options
        Set:     dgMultiSelect to False
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 12094360
 Sorry, I did not read the question carefully....

DBGrid.Options := [dgEditing,dgAlwaysShowEditor,dgTitles,dgIndicator,dgColumnResize,dgColLines,dgRowLines,dgTabs,dgConfirmDelete,dgCancelOnExit,dgMultiSelect];

is impossible multiselection of columns, but it is possible multiselection of rows in DBGrid.
0
 
LVL 6

Accepted Solution

by:
Amir Azhdari earned 300 total points
ID: 12094439
>In multiselect mode, HOW TO PREVENT MULTISELECTION ON COLUMNS , but allow multiselection on rows?

the Answer is :


just add a line to  oncreate event of your form :

procedure TForm1.FormCreate(Sender: TObject);
begin
tstringgrid(dbgrid1).Options:=[goFixedVertLine,goFixedHorzLine,goVertLine,goHorzLine,goRangeSelect,goColSizing,goThumbTracking];
end;
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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

18 Experts available now in Live!

Get 1:1 Help Now