[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 634
  • Last Modified:

MSHFlexgrid Column Headings

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
bfassler
Asked:
bfassler
1 Solution
 
TimCotteeCommented:
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
 
bfasslerAuthor Commented:
It worked!  Thanks Tim.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now