Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: calinutzPosted on 2005-09-02 at 03:43:40ID: 14808924
So ... you want to autoAdjust the column Widths on a click... for the requested column...
This is a little bit hard to do.
First you need to get the width of one character.
Then you need to get the number of visible rows. Then pick up the fort record shown and the last one shown. Then between these records (for loop) find the longest string on the specified column.
Then with the lenght of the caracter multiplied by the Strlen of the longest string in the specified column you obtain the width that you need for the column.
Then it's just piece of cake...
:-)