Find and select text in a gridview column

Post

Posted
Rating:
#1 (In Topic #933)
Enthusiast
gambafeliz is in the usergroup ‘Enthusiast’
 I need to search from a TextBox and select text in a certain column of a gridview, any ideas?

Thanks.

For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’

gambafeliz said

I need to search from a TextBox and select text in a certain column of a gridview, any ideas?

Thanks.

I don't think you can as it's a gridview cell not a textarea that has selection methods.
A TableView may possibly work as it has edit methods.

Do you just want to select part of the text or the whole cell?

Gridview does support RichText though so you could use html tags to change the text appearance to make it look selected or just highlight it.

Code (gambas)

  1. GridView1[0, 0].Text = ""  ' you have to clear .Text to use .RichText
  2. GridView1[0, 0].RichText = "Here is <font color=green>green text</font> in the field"
  3.  
Could be another of those fancy methods that needs you to make a ScrollView and use panels rather than expecting too much from a GridView.
Online now: No Back to the top

Post

Posted
Rating:
#3
Enthusiast
gambafeliz is in the usergroup ‘Enthusiast’
 Thank you for your nice help.

I have solved it with a Textbox and in its Keyrelease() event, when I write, I go through the entire gridview and change the color of the text and the one that should not be changed I leave it as default.

Thanks you are the best.

For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
Online now: No Back to the top
1 guest and 0 members have just viewed this.