Solved

Hiding columns in a flexgrid

Posted on 2000-05-01
6
340 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
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
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 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.

M
0
 

Author Comment

by:DebeG
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.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 12

Expert Comment

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

M
0
 

Author Comment

by:DebeG
ID: 2780497
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
ID: 2780533
No problem. Always glad to help in either VB or how to use EE! :-)

M
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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 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