Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flexgrid highlight

Status
Not open for further replies.

savok

Technical User
Jan 11, 2001
303
AT
I have a grid filled with info. When the user clicks on a row it gets Highlighted. And everything is just great. But if I put something in the on click grid event it no longer stays highlighted when the user clicks on it.

For example i need to get the text out of col1 row1. When the user clicks on the row it gets the info but it loses its highlight. What can i do to get the info out and still keep the row highlighted.

Thanks!
 
that doesnt work :(

Private Sub Grid_Click()
Grid.Row = Grid.RowSel
Grid.Col = 1
ID = Grid.Text
Grid.HighLight = flexHighlightAlways
End Sub

what it does is highlight the row when you click on it and then unhighlight it really quick

if i remove everything from the Click event it highlights just fine

I need to get the data out of the first row and still keep it highlighted.

Thanks

 

You need to set the property before you click on the grid. If you right-click the grid in form design mode and select properties, the Highlight and focus rectangle properties can be set (or set the property via code in the Form Load event.)

Mark
 
The properties are set to AlwaysHighlight and FocusHeavy already but it still doesnt stay highlighted when you click on it. It highlights and disappears right away :(
 

Since Grid.Row returns the Active cell row (from the Click event) Try this instead :

Dim i as integer

i = 0 ' set to the appropriate column you want to return
ID = Grid.TextMatrix(Grid.Row, i)



Mark


 
Thank a lot mark! it worked :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top