Find and select text in a gridview column
Posted
#1
(In Topic #933)
Enthusiast

Thanks.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
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)
- GridView1[0, 0].Text = "" ' you have to clear .Text to use .RichText
- GridView1[0, 0].RichText = "Here is <font color=green>green text</font> in the field"
Posted
Enthusiast

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.
1 guest and 0 members have just viewed this.



