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
Solved

MSHFlexgrid Column Headings

Posted on 2000-04-18
2
604 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
ID: 2726971
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
ID: 2727016
It worked!  Thanks Tim.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

765 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