Solved

How obtain first visible column in DBGrid?

Posted on 1997-12-13
1
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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