MS Flex Grid

jaimekb
09-08-2000, 10:47 AM
I am using a flex grid to display data. I want to find the maximum value (peak) in one of the columns and highlight that row of the grid for the user. Any suggestions on how to do this?

Valkyrie
09-08-2000, 01:35 PM
Try this code in your DblClick event of your FlexGrid

<font color=blue><pre>Dim x As Integer
Dim savRow As Integer
Dim savVal As String
savRow = 0
savVal = MSFlexGrid1.TextMatrix(1, MSFlexGrid1.Col)
For x = 1 To MSFlexGrid1.Rows - 1
If savVal < MSFlexGrid1.TextMatrix(x, MSFlexGrid1.Col) Then
savRow = x
savVal = MSFlexGrid1.TextMatrix(x, MSFlexGrid1.Col)
End If
Next x

</font color=blue></pre>


Now you know what row to highlight or manipulate in any other way.

Cheers. /images/icons/smile.gif


Quote of the moment....
"My job is so top secret even I don't know what I'm doing!"

jaimekb
09-08-2000, 04:06 PM
Thanks!

Valkyrie
09-08-2000, 04:13 PM
No sweat! /images/icons/smile.gif

Quote of the moment....
"My job is so top secret even I don't know what I'm doing!"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum