5 Replies Latest reply on Aug 8, 2008 3:47 AM by Sathish_Kumar.T

    Filter input in Grid Header

    ctzn99 Level 1
      Hey all,

      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 letters.

      http://www.blackmaple.net/flex/grid/test.html

      Any thoughts on this problem would be greatly appreciated, basically i just want to be able to type and have the grid contents filter without having to use the mouse after each keyboard press.

      Regards