Results 1 to 4 of 4

Thread: format text

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Penang, Malaysia
    Posts
    51

    Question Format text

    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?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try setting the .Row property as well.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Penang, Malaysia
    Posts
    51

    how to set the row?

    I dunno how to set the .row?
    because i retrieve the data from database so i will not know how many row there are.

  4. #4
    New Member
    Join Date
    Aug 2000
    Location
    Hong Kong
    Posts
    5

    Re: how to set the row?

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width