Results 1 to 3 of 3

Thread: Data Grid - Active X Control

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    45

    set the column heading

    ' Build the column header string with appropriate column names
    strColHeader = ""
    strColHeader = strColHeader & "Quote Date" & vbTab & "Quote ID" & vbTab
    strColHeader = strColHeader & "Created By" & vbTab & "Customer"

    ' Write the string to the grid
    .AddItem strColHeader, 0


    ' Here you can create all your data rows but
    ' you must create at least one more row before you can set
    ' your column header row(s) in the next step


    ' Tell the grid that you want one row to be your column header row
    ' Apparently it will choose the first row that you created above
    .FixedRows = 1
    If I could only remember my name...

  2. #2
    Member
    Join Date
    Jan 2001
    Posts
    40
    Thanks,
    I will give it a try

  3. #3
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    FormatString Property Example
    The following examples illustrate how the FormatString property works.

    Note If you are using the MSFlexGrid, substitute "MSHFlexGrid1" with "MSFlexGrid1."

    ' Set column headers.
    s$ = "<Region |<Product |<Employee |>Sales "
    MSHFlexGrid1.FormatString = s$



    ' Set row headers (note semicolon at start)
    s$ = ";Name|Address|Telephone|Social Security#"
    MSHFlexGrid1.FormatString = s$



    ' Set column and row headers.
    s$ = "|Name|Address|Telephone|Social Security#"
    s$ = s$ + ";|Robert|Jimmy|Bonzo|John Paul"
    MSHFlexGrid.FormatString = s$


    Regards,
    TheBao

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