Flexicious List Based Filter Controls:
SUMMARY:
This example demonstrates the following features:
- Creation of your own Filter Renderer
- Initialization of filter renderes with custom properties, and styles
- Difference between using the filterComboBoxBuildFromGrid property and filterComboBoxDataProvider property.
Key Points to notice are :
Markup for the Individual columns :
- The FirstName/LastName Columns - We’ve implemented an autocomplete search filter for these columns. The Autocomplete is NOT a part of the Flexicious SWC, it is just being used here to demonstrate how you may use your own implementation of IFilterControl. For this, we just used ADOBE’s autocomplete implementation within our filtering infrastructure. (com.sample.examples.support.AutoComplete). All we’ve done is instead of inheriting it from mx.contorls.ComboBox, we inherit it from com.flexicious.controls.ComboBox. This makes it Flexicious enabled. We added a few minor tweaks in com.sample.examples.support. MyAutoComplete, and now it can be used as a grid embedded or detached filter control. If you run the example, you will notice that the FirstName/LastName field are autocomplete, bound to the employees collection, with its labelField, dataField and seachField set to “firstName/lastName”.
-
The Department (Parameterized) column - This column demonstrates how you can create a filter renderer with initial default parameters:
com.flexicious.utils.UIUtils.createRenderer (MyComboBox,{editable:true,rendererStyleName:'solidBorder'}). Here, MyComboBox represents the filter contorl we want to initialize, the object that is in the second parameter specifies initialization values. IFilterControls explose a property called rendererStyleName, which you can set to initialize the renderer’s style. - The Department (Manual) column - This shows how list based filter controls (like the ComboBox and MultiSelectComboBox) can be initialized from a external data provider.
- The Department (Auto) column - This shows how list based filter controls (like the ComboBox and MultiSelectComboBox) can be initialized using a distinct list of all the items being displayed in the column.
