开发者

customized advanced datagrid in Flex 4

I had 7 columns in an advanced datagrid and have one comboBox with all of the columns names. The datagrid should show only the columns the use has selected in the c开发者_运维百科omboBox. Does this mean customization of the advanced datagrid columns? If anyone has any samples, please share them.


For example if you have a DataGrid like this

<s:DataGrid 
            width="100%" height="100%" dataProvider="{ac01}" >
    <s:columns>
        <s:ArrayList>
            <s:GridColumn id="colType" dataField="type" headerText="Type"/>
            <s:GridColumn dataField="message" headerText="Message" />
        </s:ArrayList>
    </s:columns>
</s:DataGrid>

You can trigger some event and call this line of code

colType.visible = false;

Then the column colType will disappear. If you want to show that column again, just assign the true value to its visible property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜