Finding specific text in dataGrid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
BIX
Posts: 33
Joined: Fri Oct 27, 2006 2:54 pm

Finding specific text in dataGrid

Post by BIX » Fri Aug 12, 2011 7:35 am

I've searched the forums and couldn't find anything about this. Is there a way to search for text in datagrid as in basic list field (using find "something" in field "someField")?
Thanks....
BIX

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Finding specific text in dataGrid

Post by bangkok » Fri Aug 12, 2011 9:10 pm

You'll find useful infos on :

http://lists.runrev.com/pipermail/use-l ... 60402.html

But you have to consider the issue :

-if the data are coming from a SQL DB... then it's easier to do the search through a SQL query

-or a more simple solution : put the content of the datagrid into a variable, and then use functions like Offset, WordOffset, ItemOffset on this variable.

Code: Select all

put the dgText of group "myDatagrid" into theData
put ItemOffset ("text i'm looking for", theData) into ab
if ab = 0 then
answer "Not found"
else
answer "Found"
end if
-third solution : put the content of the datagrid into a simple text field, and then use the command Find

[see the dictionnary]

Post Reply