how can i format the text display in the MSHflexgrid?
code:
MSHFlexGrid2.Col = 6
MSHFlexGrid2.Text = Format(MSHFlexGrid2.Text, "dd/mm/yyyy")
I using above code but it only format first row of my table, what should i do?
Printable View
how can i format the text display in the MSHflexgrid?
code:
MSHFlexGrid2.Col = 6
MSHFlexGrid2.Text = Format(MSHFlexGrid2.Text, "dd/mm/yyyy")
I using above code but it only format first row of my table, what should i do?
Try setting the .Row property as well.
I dunno how to set the .row?
because i retrieve the data from database so i will not know how many row there are.
just had the same problem,what I found was that I needed to set the row with a loop, e.g.
Dim numrows As Integer
Dim inum As Integer
numrows = Val(MSFlexGrid1.Rows - 1)
For inum = 1 To numrows
MSFlexGrid1.Col = 0
MSFlexGrid1.Row = inum
MSFlexGrid1.Text = FormatNumber(MSFlexGrid1.Text, 3)
Next inum
This gave me 3 decimal places for all the rows in column 0, hope it's okay for you
cheers
Tee Jay