[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How obtain first visible column in DBGrid?

Posted on 1997-12-13
1
Medium Priority
?
416 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 140 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

830 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