2011-02-02 59 views
2

在下图所示的AdvancedDataGrid中,我有一个可以看到的分组字段。如何在AdvancedDataGrid中的记录下面显示某些区域

我希望能够点击记录(让我们来说说26/01/2011 - 页),然后右下角有一些动作按钮。

我该怎么办?这是通过使用AdvancedDataGridRendererProvider吗?我试图去做,但没有得到预期的结果。

enter image description here

+0

这是否最终为您工作? – 2011-02-09 16:06:03

回答

2

你需要与各国定义自己的ItemRenderer正常/点击

例子:

<mx:AdvancedDataGridColumn headerText="Keyword" dataField="keyword"> 
     <mx:itemRenderer> 
      <fx:Component> 
       <mx:VBox width="100%" height="100%" 
        click="this.currentState = (this.currentState=='normal')? 'clicked' : 'normal'"> 
        <mx:states> 
          <s:State name="normal"/> 
          <s:State name="clicked" /> 
        </mx:states> 
        <s:Label text="text" /> 
        <s:Button label="Button" includeIn="clicked" /> 
       </mx:VBox>      
      </fx:Component> 
     </mx:itemRenderer> 
</mx:AdvancedDataGridColumn> 

当用户点击该单元格,该组件将改变状态和渲染一些按钮。您可能必须调用datagrid上的invalidateSize()来重新绘制行。

从这里你可以做一些关于滚动你自己的项目渲染器和如何访问外部数据的研究。这应该让你开始。希望能帮助到你!

相关问题