MSHFlexGrid col data format

Garry Clarke
10-04-2001, 07:26 PM
I am drawing data from a db to populate MSHFG. I have 1 fixed col & row and 3 other Cols that hold data. As the first 2 cols are strings they are fine my problem is with the third col which I need to appear as a percent.
Currently the data value is say 10(that appears in MSHFG) what I want to show is 10.00%.
Can anyone help
Garry

Flyguy
10-05-2001, 01:35 AM
You could format the cells in the desired rows by yourself.

eg.
<pre>
dim iRow as Integer
dim myCol as Integer

myCol = 3 ' The Column you want to reformat

With MSFlexGrid1
For iRow = .FixedRows to .Rows - 1
.TextMatrix(iRow, myCol) = Format(Val(.TextMatrix(iRow, myCol)), "0.00") & "%"
Next iRow
End With
</pre>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum