?
Solved

Column Width in a TDBGrid

Posted on 1998-07-10
7
Medium Priority
?
354 Views
Last Modified: 2010-08-05
Is there a way to determine the width of each column in a TDBGrid.

If a user has resized one or more columns I want to know the new widths.

I am using D1 and WFW 3.11
0
Comment
Question by:jdthedj
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Expert Comment

by:Matvey
ID: 1357558
DBGrid1.Columns[i].Width (where i is a column number from 0 to Count)

Regards, bosism@netvision.net.il
0
 
LVL 3

Author Comment

by:jdthedj
ID: 1357559
Hi Matvey - I tried that, but I get the error "Field Identifier expected".  It won't recognise the Columns property.
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1357560
The correct answer should be

 dbGrid1.fields[ n].displayWidth:= w

This will change the width of column n to w characters width;


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:jdthedj
ID: 1357561
Hi kjteng - if you'd like to turn your comment into an answer I'll give you the points.  Thanks a lot.

Sorry Matvey!!
0
 
LVL 2

Accepted Solution

by:
kjteng earned 400 total points
ID: 1357562
dbGrid1.fields[ n].displayWidth:= w

     This will change the width of column n to w characters width;
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1357563
Hi, I'm sorry, didn't see that it's D1. My answere was for D2 and 3, but I guess it wasn't yet implemented in D1...

Cheers.
0
 
LVL 3

Author Comment

by:jdthedj
ID: 1357564
Thanks guys!!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

771 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