Question

LATEST UPDATE: Issue answered here. Some one else at stackoverflow had a similar issue and it was resolved. Solution provided for convenience. This is the line of code I was missing:

 comboHeaderColumn.useLabelFunctionForFilterCompare = true;

that line is followed by these:

 comboHeaderColumn.filterComboBoxBuildFromGrid = true;
 comboHeaderColumn.labelFunction = formatState;

where formatState is a local method that formats the data for the combobox.


UPDATE: I've now got the combobox's loading with the correct data, but when I select a value nothing happens. The combo boxes load only data that is in the column, and when you select a value in the combobox, it's supposed to filter the rows on that value. It doesn't.

Thanks for looking. I'm having trouble getting multiple filters to work in Flex in Flash Builder 4 using the ExtendedDataGrid and ComboBox's. Here is an image of part of the grid:

Current Data Grid

The User Name and City filter properly if you type text into the box's above the column header and the Request Date lets you select date ranges if you click on the Custom bar, but the Request Reason and State ComboBoxes do not list anything. I've created them using comboHeaderColumn.filterComboBoxBuildFromGrid = true; but all it does is put "[object Object]" as the only other selection under All.

I've used this article but it will only allow you to use a single filter for the entire grid.

My finished grid will have about 20 columns and from 20,000 to 450,000 rows of data so the filters are really important and I'll need more than one.

The code is very straight forward and loops through all the returned data and if the column is identified as a filter column it does this:

comboHeaderColumn.filterComboBoxDataProvider = codeValuePairs;
comboHeaderColumn.filterComboBoxLabelField = "Value";
comboHeaderColumn.filterControl = "ComboBox";
comboHeaderColumn.filterOperation = FilterExpression.FILTER_OPERATION_TYPE_EQUALS;                  
comboHeaderColumn.headerText = ac.Header;
comboHeaderColumn.dataField = ac.Name; 
if( ac.Header == "State" || ac.Header == "Request Reason" )
{
    comboHeaderColumn.filterComboBoxBuildFromGrid = true;
}   

ProfileDataColumns.push(comboHeaderColumn); 

This creates 2 entries in the combo box: All and [object Object]

What am I missing??? Anyway, after half a day searching I decided to reach out.

Any suggestions or direction to an article would be very much appreciated.

Thanks.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top