Results 1 to 5 of 5

Thread: [RESOLVED] MSFlexgrid format as text

  1. #1

    Thread Starter
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Resolved [RESOLVED] MSFlexgrid format as text

    hi experts,
    actuly the numbers aligned into right automaticaly, how to change them as text format in flexgrid? and also tell me abt how to use alignment pls.
    thanks
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: MSFlexgrid format as text

    Use the ColAlignment property. ColAlignment typically sets the alignment for an individual column. It aligns the data both horizontally and vertically.


    Me.MSFlexGrid1.ColAlignment(1) = flexAlignLeftCenter
    Me.MSFlexGrid1.ColAlignment(2) = flexAlignRightCenter
    Me.MSFlexGrid1.ColAlignment(3) = flexAlignLeftBottom

    You can set the exact same alignment for all columns in one call by passing a -1

    Me.MSFlexGrid1.ColAlignment(-1) = flexAlignRightTop

  3. #3

    Thread Starter
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: MSFlexgrid format as text

    thank u very much
    and i want to knw how to convert numbers to text format, bcas if i use zero infront of numbers it wont show the zero.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: MSFlexgrid format as text

    You can only have leading 0's in a String (which includes FlexGrid cells), not in a numeric data type.

    If you can't get it working properly, show us your code.

  5. #5

    Thread Starter
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: MSFlexgrid format as text

    i use cstr to convert, now its working
    thanks
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


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