Hey all,

I'm attempting to implement a search facility to be used with the grid 
component. The idea is to filter the grid data according to a simple key 
string. 

I tried looping through the data and using the String.indexOf -method to find 
matching rows, but that way the search seemed to run extremely slowly. Am I 
right to suspect that this is due to the fact that the grid component has to 
access basegridrow -objects and the subviews it's composed of and finally the 
dataset it referring to? The built-in sorting of the grid rows seems to work 
like breeze, though, but that's probably because it uses the datapath's 
setOrder-method?

I thought about making an array for each column to be searched with indexes and 
corresponding field values, then looping through the array and removing the 
non-matching rows from the grid (or the underlying dataset) to leave the 
matching rows visible. But I wonder if there's a better way to do that, perhaps 
some existing functionality in the base classes that I'm not aware of or 
perhaps there's a more optimal way of going through the data?

Any ideas?

Regards,
Mikko




Reply via email to