“Flexicious”:无法在数据网格中动态更改搜索功能

时间:2012-06-07 10:09:07

标签: actionscript-3 flex4 flexbuilder flexicious

“Flexicious”第三方组件库,用于处理DataGrid for flex中非常大的数据集,问题是,我无法在数据网格中动态更改搜索功能。

     <flxs:FlexDataGridColumn id="multiselect" dataField="Name" headerText="Name"
        filterControl="NumericTextInput"  headerAlign="center">                                 
        <flxs:headerRenderer>
        <fx:Component>
        <controls:ComboBox change="changeSel(event)" width="10" height="41" dataProvider="outerDocument.searchArray}">                          

<fx:Script>                                             

<![CDATA[
    import com.flexicious.controls.ComboBox;

    import mx.controls.Alert;                               

    public function changeSel(event:Event):void{                                    

    var cbox:ComboBox = event.currentTarget as ComboBox;                                

    if(cbox.selectedItem=="Less Than"){                                         

    outerDocument.multiselect.filterOperation="LessThanEquals";                                 

    //Alert.show(""+outerDocument.multiselect.filterOperation);                             

    }else if(cbox.selectedItem=="Greator Than"){                                        

    outerDocument.multiselect.filterOperation="GreaterThanEquals";                              

    //Alert.show(""+outerDocument.multiselect.filterOperation);                         

    }else if(cbox.selectedItem=="Equal To"){                                        

    outerDocument.multiselect.filterOperation="Equals";                                     

    //Alert.show(""+outerDocument.multiselect.filterOperation);                         

    }else  if(cbox.selectedItem=="Begins With"){                                        

    outerDocument.multiselect.filterOperation="BeginsWith";                                     

    //Alert.show(""+outerDocument.multiselect.filterOperation);                         

    }                                                   

    }                                                   

    ]]>                                         

    </fx:Script>                                        

    </controls:ComboBox>
    </fx:Component> 
    </flxs:headerRenderer>
    </flxs:FlexDataGridColumn>

现在,当我从渲染的组合框中选择任何选项时,我无法更改滤镜选项,但是当我改变滤镜操作时,它会显示改变的操作,但在功能上它不会改变。

1 个答案:

答案 0 :(得分:1)

更改filterOperation后,您应该调用grid.rebuildFilter()