Solved

Hiding columns in a flexgrid

Posted on 2000-05-01
6
314 Views
Last Modified: 2010-05-02
Is there a way to hide columns in a flexgrid?  
0
Comment
Question by:DebeG
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

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

Accepted Solution

by:
mark2150 earned 50 total points
Comment Utility
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.

M
0
 

Author Comment

by:DebeG
Comment Utility
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.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 12

Expert Comment

by:mark2150
Comment Utility
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.

M
0
 

Author Comment

by:DebeG
Comment Utility
The white paper is printing out now.  Thanks again.  Sorry I didn't see the accept comment as answer button.  
0
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
No problem. Always glad to help in either VB or how to use EE! :-)

M
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now