Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormatString in HFlexgrid not formating on fixed column

Status
Not open for further replies.

olichap

Programmer
Mar 20, 2001
389
US
I am using VB6, SP5; my HFlexgrid component is listed as SP4 (ver 6.0.88.4). My grid as 6 rows, 2 columns; 0 fixed rows, 1 fixed col.

In code I am trying to set the FormatString to display my field names vertically in the fixed column. Here is my code:

sFieldNames = ";Name |Address1 |Address2 |Cty/St/Zip |Control# |DOB "
.FormatString = sFieldNames

When the app is run and the grid populated, the field names do not appear (the fixed column is still blank). Any assistance would be appreciated.

Thanks,
Oliver
 
I believe FormatString assumes there is at least one fixed row to begin with. This works:

Code:
MSFlexGrid1.FixedRows = 1
MSFlexGrid1.FormatString = ";Name |Address1 |Address2 |Cty/St/Zip |Control# |DOB "
MSFlexGrid1.FixedRows = 0


Mark
 
Thanks,

I will give the above a shot. I ended up setting the text for each field in the fixed col individually (which is not the way I want to do it). Originally I opted not to use a fixed row since I really don't need it, but if it will allow me to cut down on the lines of code it could be worth trying.

O
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top