Hiding columns in a flexgrid

Posted on 2000-05-01
Medium Priority
Last Modified: 2010-05-02
Is there a way to hide columns in a flexgrid?  
Question by:DebeG
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

Expert Comment

ID: 2765974
yes the best way as someone put it is the easiest way is to set its width to 0
flexgrid1.colwidth(1) = 0
LVL 12

Accepted Solution

mark2150 earned 200 total points
ID: 2766009
Don't hide columns. That's resource wasteful and sloppy coding.

Only populate the columns you need. Change your SELECT * FROM .. into SELECT {field list} FROM ...

If you need to have an array of data from the data source but you don't want the user to see it then declare a separate array to hold the data. This will keep the data with a shared index but will reduce the overhead as the array doesn't have the list of properties to manage. Using "invisible" columns also serves to obscure the function being performed.


Author Comment

ID: 2778920
Marine - I had already adjusted my column width to 0 before I posted the question.  I guess I just thought there was another way to do this.  

Mark2150 - Thanks for the advice.  I am just learning and do not know all the 'correct' ways of doing things yet.  I appreciate constructive criticism.  It helps to make me a better programmer, i think.  Actually, in another language (Synon on AS400) it would have been perfectly fine to hide a field on a screen for later use.  Just idiosyncrasies of different languages, i guess. I will award the points to you if you post your response as an answer.
Independent Software Vendors: 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 12

Expert Comment

ID: 2779007
Thank you for the positive feedback. While making the column 0 width *does* work, I do feel, having had to maintain code that does stuff like that, that my way does work better.

If you're interested I have a "white paper" on VB style on my corporate web page. Visit www.netexperts.cc and go down to the bottom.

There is no need to post as answer as you can use the "Accept comment as answer" button on any response.


Author Comment

ID: 2780497
The white paper is printing out now.  Thanks again.  Sorry I didn't see the accept comment as answer button.  
LVL 12

Expert Comment

ID: 2780533
No problem. Always glad to help in either VB or how to use EE! :-)


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

770 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