I'm trying to create a series of text input boxes that allow
me to filter rows of a grid. Simple enough and I've done it lots of
times BUT the input boxes (or check boxes or combo boxes whatever)
have always been outside of the grid.
In otherwords, what I'm trying to do now is include a text
box as part of the header of each row, thus allowing the filter
boxes to resize and stay positioned with their appropriate rows
and, from a UI design, be properly positioned beneath each columns
header text. Creating the text box was also no problem and I've
created several different header renderers in the past.
The problem I'm having is that, during the change event of
each text box I'm either
a) calling refresh on the dataprovider (in this case an xml
collection) to apply the filtering
b) changing or updating the dataprovider manually.
and in either case the text box i'm typing in loses focus
when the grid redraws its contents (i'm assuming) so you have to
type one letter at a time and then use the mouse and click on the
text input again.
Here's a link to my example app, it doesn't do any filtering
at this point (it did but I removed it to keep things simple) but
it does show the problem, in the header try typing a series of
Hmm. While I did make some changes and this does appear to be
working at least in my sample app I worry that if there were was a
large amount of data on screen and in the xml I was filtering and
it took long to update then the user could easily type faster than
focus was returning to the input control.
Slow being more than .25 of a second (i.e. not very slow).
I did think of trying that earlier but didn't think it was
going to really be feasible. We'll see how it responds when I put
it into place in an actual app.
In the meantime if anyone else has any ideas don't hold back