Solved

MSHFlexgrid Column Headings

Posted on 2000-04-18
2
594 Views
Last Modified: 2013-12-25
I am filling a MSHFlexgrid with data using an ADODC control.  The column headings are defaulting to the field names from the table in the database (sybase).  I have changed the names of the columns using the colheadercaption property, and I needed to change the fixedrows property to 0, in order to not display the original columnheader row, but now when I scroll down in the flexgrid, I lose my column headers.  Help!  I need to retain the column headers.
0
Comment
Question by:bfassler
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
Comment Utility
Use .TextMatrix instead of .ColHeaderCaption

With MSHFlexGrid1
    .TextMatrix(0, 1) = "GoodBye"
    .TextMatrix(0, 2) = "Farewell"
End With

And don't change the FixedRows property. This will retain the new column headers.

An alternative method if applicable is to return the correct header in the SQL statement:

SELECT Field1 As Name,Field2 As Address FROM MyTable
0
 

Author Comment

by:bfassler
Comment Utility
It worked!  Thanks Tim.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
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…

763 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

10 Experts available now in Live!

Get 1:1 Help Now