CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Location
    Rhode Island
    Posts
    56

    Which rows are selected? - MSFlexGrid

    I have a flexgrid which allows users to select 1 or more rows (by clicking them with the mouse or shift-click to highlight multiple). The user then clicks a button. At this point, I would like to take the data just from the highlighted rows in the flexgrid and process them. What is the property that will tell me which rows are highlighted? Would I have to cycle through the flexgrid to determine which ones they are? How would I do this?

    Any help would be much appreciated...

    Thanks,
    Ron


  2. #2
    Join Date
    Mar 2001
    Location
    Australia
    Posts
    146

    Re: Which rows are selected? - MSFlexGrid

    Have a look at Row and RowSel. They will tell you the start and end row you have selected.

    You have to a bit careful though as Row will tell you the first row selected and RowSel the last one which means that RowSel can be less than Row.

    eg.
    If you select say Row 10 and then row 4
    Row will be 10
    Rowsel will be 4

    If you select Row 4 first and then Row 10
    Row will be 4
    Rowsel will be 10

    You can then step through the selected rows.

    Hope this helps,

    Nathan Liebke


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

Featured