Solved

How obtain first visible column in DBGrid?

Posted on 1997-12-13
1
392 Views
Last Modified: 2010-07-27
      Hey!

I want to to read what column is the first visible in a DBGrid component at any given time. With a StringGrid it's easy to obtain, with the LeftCol property, but DBGrid doesn't seem to have a similar property. Anybody know any other way?

Thanks!

Daniel, Sweden
0
Comment
Question by:Dippen
1 Comment
 
LVL 8

Accepted Solution

by:
ZifNab earned 70 total points
ID: 1353547
What about this? :

procedure TForm1.Button2Click(Sender: TObject);
var
   i: Integer;

begin
 i := 0;
 while (table1.fields[i].visible = false) and (i <= table1.FieldCount-1) do inc(i);
end;

The first visible field is the first visible column.

Have fun,
c.u. ZifNab;
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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