Grid

Could anyone tell me/show me how to find out if any rows have been selected or not on an MXFlexGrid??

Thanks
Scott
SCOTT78Technical AdvisorAsked:
Who is Participating?
 
PaulHewsCommented:
As an example
dim intRow as integer, intRowSel as integer
With flxGrid
  if .row < .rowsel then
    intRow = .Row
    intRowSel = .RowSel
  else
    intRow = .RowSel
    intRowSel = .Row
  end if

  for i = intRow to intRowSel
    .TextMatrix(i, 0) = "new value"
  next i
End with

In practice, caching .row and .rowsel is a good idea because depending which way the mouse drags, .rowsel could be smaller than .row.  Also if you are changing certain cell properties, (.cellbackcolor etc.) the only way to do it is to change .row and .rowsel to select the cells you wish to change.
0
 
hesCommented:
Have you tried:

Private Sub MSFlexGrid1_SelChange()
 MsgBox MSFlexGrid1.RowSel
End Sub
0
 
PaulHewsCommented:
Actually the rows between .row and .rowsel are selected.
0
 
SCOTT78Technical AdvisorAuthor Commented:
Is there anything that I can use that will say:

 With the rows that have been selected then do this..

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.