Results 1 to 11 of 11

Thread: Question on MSHFlexgrid

  1. #1
    Alain
    Guest

    Question on MSHFlexgrid

    Hi all.

    I've just been introduced to MSHFlexgrid (thanks to John McKernan) and I have a fiew questions:

    - I've set the grid selection mode to "ByRow" (which is exactly what I want) but I can't seem to find a way to block multiple row selection. Is it possible to block multiple selection of rows?

    - Also, I've been able to display column headers without too much hassle. Now I'd like for them to remain displayed on top of the window even if I scroll down the list. I was able to do this without too much problems with a Datagrid control. So is this possible with an MSHFlexgrid control as well?

    So that's it for now!

    Thanks in advance...

  2. #2
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413
    use this... if the user selects more than one row then it just forces it back to the first selected row


    Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)

    If MSFlexGrid1.RowSel <> MSFlexGrid1.Row Then
    MSFlexGrid1.RowSel = MSFlexGrid1.Row
    End If

    End Sub

  3. #3
    Alain
    Guest
    Hey thanks!

    That resolve my first problem!

    Anyone for the second? ...

  4. #4
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413
    Do you have fixed rows set to 1???? if you want your colum headings to stay you need to set 1 fixed row.

  5. #5
    Alain
    Guest
    Well..... euh...... no.

    (Shame surging within my small humble person that wants to hide under the table...)

    Thanks! That resolves it.

  6. #6
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413

    Talking

    no problem

  7. #7
    Alain
    Guest
    You woudn't happen to know how to resize a specific column as run time, would you?

    Thanks!

  8. #8
    Alain
    Guest
    Never mind! Just got it!

    Thanks anyway.

  9. #9
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    Hi Alain,

    Gald the MSHFlexGrid is working out for you.

    To resize a column at run time...

    VB Code:
    1. MSHFlexGrid1.ColWidth(1) = 1000

    This codes sets the width of column 1 (second column) to 1000 twips. This works for all coumns including fixed columns.

  10. #10
    Alain
    Guest
    Hi John.

    Yes, you bet the MSHFlexgrid is doing the job!

    Thanks again.

  11. #11
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    My pleasure

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