Hello FlexCoders,

I am trying to implement a datagrid filtering mechanism to datagrids in my 
application.

In this process, I want to show a popup window where it would act like a 
response window.  The popup window will contain three controls, namely, two 
comboboxes, and a textinput control.  One of the combo box would contain the 
columns currently displayed in the datagrid.  The other combo box would contain 
common comparison operators (i.e. =, !=, >, <, like, etc.). Of course, there 
would also be two buttons - OK and Cancel to perform the filter operations.

I found a popup panel example here..
http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/

But in this example, he is defining the content of the popup panel.

Since we know that the controls in the popup panel is fixed, would it be 
possible to just create another control which contains the controls we have 
defined?  Then, the combobox panel would be populated with the columns in the 
datagrid where it was called. When the column selection from the combo box is 
made, the operator also selected and the text input is filled up with the value 
to filter, clicking on OK button would filter the datagrid.

Another reason that I wanted that the filter mechanism reusable because I have 
a lot of mxml with datagrid that requires the same filter functionality. It 
would not be too good if I would place all the codes in each mxml, right?

I am not sure if this approach would be good.  If in case you have other 
approach on how to filter the datagrid, kindly let me know.

Thanks.


      

Reply via email to