Find in a DataGrid
Posted: Mon Aug 29, 2011 6:44 pm
Each execution of Find "XXX" will will look for the next field on a card containing those characters and, if found, will place a box around them. When all the such occurrences have been found, the search moves on to the next card and continues looking for fields containing those characters. My first question is to ask if there is a way that the search my be limited to just the current card?
Find "XXX" will also find all the places in the visible portion of a DataGrid that contain those characters. However, if the datagrid has more rows than can be shown at the same time, any other places with "XXX" will not be scrolled to and found.
Datagrids have the provision to Find by using FindIndex or FindLine so the first occurrence of "XXX" in "Col 5" could be found with:
Dispatch "FindIndex" to group "DataGrid 1" with "Col 5", "XXX"
If found, an index value greater than 0 would be returned ( say some value pIndex) and you could scroll to that place and hilite the line with the combination:
Dispatch "ScrollIndexIntoView" to group "DataGrid 1" with pIndex
set the dgHilitedIndexes of group "DataGrid 1" to pIndex
My question here is: How do I go about finding then next occurrence of "XXX"?
Also if it is in a different column from "Col 5" how would I find it.
Thanks in advance for any help,
Larry
Find "XXX" will also find all the places in the visible portion of a DataGrid that contain those characters. However, if the datagrid has more rows than can be shown at the same time, any other places with "XXX" will not be scrolled to and found.
Datagrids have the provision to Find by using FindIndex or FindLine so the first occurrence of "XXX" in "Col 5" could be found with:
Dispatch "FindIndex" to group "DataGrid 1" with "Col 5", "XXX"
If found, an index value greater than 0 would be returned ( say some value pIndex) and you could scroll to that place and hilite the line with the combination:
Dispatch "ScrollIndexIntoView" to group "DataGrid 1" with pIndex
set the dgHilitedIndexes of group "DataGrid 1" to pIndex
My question here is: How do I go about finding then next occurrence of "XXX"?
Also if it is in a different column from "Col 5" how would I find it.
Thanks in advance for any help,
Larry