?
Solved

MSHFlexgrid Column Headings

Posted on 2000-04-18
2
Medium Priority
?
618 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
[X]
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
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 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