CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2016

    How to select single row in MSFlexGrid dynamically

    I have grid object and one Int Variable, as per value of that int varible, i have select or highlight that whole row.
    Suppose int = 3 then i have highlight 3 row
    if it have 4 i have highlight or select row 4.

    I have tried following
    Private Sub NumericDisplay1_Change()
    MSFlexGrid2.RowSel = 0
    MSFlexGrid2.RowSel = NumericDisplay1.Value
    End Sub
    I am using VB6

    any help, really appreaciated

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: How to select single row in MSFlexGrid dynamically

    It depends on how you want to select it. One way is to set the row and the col then use colsel.

    For example if you have 6 columns and more than 3 rows you could select all of the cells in row 3 using
    With MSFlexGrid1
        .Row = 3
        .Col = 0
        .ColSel = 5
    End With
    You could use a var in place of the 3 there to make it work with whatever row

    For more info
    Always use [code][/code] tags when posting code.

Tags for this Thread

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