【问题标题】:AdvancedDataGrid - Start to edit the selected row when a button is clickedAdvancedDataGrid - 单击按钮时开始编辑选定的行
【发布时间】:2011-10-29 12:01:21
【问题描述】:

我想让用户通过单击按钮而不是单击 AdvancedDataGrid 本身来编辑 Flex AdvancedDataGrid 选定的行。所以我决定在用户​​单击按钮时调度 AdvancedDataGrid 的 itemEditBegin 事件:

myADG.dispatchEvent(new AdvancedDataGridEvent(mx.events.AdvancedDataGridEvent.ITEM_EDIT_BEGIN,false,false,0,null,myADG.selectedIndex,null));

但是当用户点击按钮时,编辑总是从 AdvancedDataGrid 的第一行开始,无论 myADG.selectedIndex 是什么。当编辑结束时,新值出现在右行(被选中)。非常奇怪的行为。我需要更正什么以便从所选行开始编辑? 我没有想法,请帮忙。

【问题讨论】:

    标签: edit advanceddatagrid selected


    【解决方案1】:

    我找到了解决方案,把这段代码放到按钮点击处理程序中:

    myADG.editedItemPosition = {rowIndex:myADG.selectedIndex, columnIndex:columnIndexYouWantToEdit};
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-15
      • 2020-08-22
      • 2014-05-16
      • 2011-10-07
      • 1970-01-01
      • 2018-12-25
      • 2014-06-27
      相关资源
      最近更新 更多