Solved

How obtain first visible column in DBGrid?

Posted on 1997-12-13
1
388 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

12 Experts available now in Live!

Get 1:1 Help Now