我通过单击复选框项目渲染器启用多行选择。
这适用于扩展mx:Datagrid
(其他答案)
override protected function selectItem(item:IListItemRenderer,
shiftKey:Boolean, ctrlKey:Boolean,
transition:Boolean = true):Boolean
{
// only run selection code if a checkbox was hit and always
// pretend we're using ctrl selection
if (item is CheckBox)
return super.selectItem(item, shiftKey, true, transition);
else //Avenir Cokaj 23/06/11: this enables the flex's natural selection
return super.selectItem(item, shiftKey, ctrlKey, transition);
}
但是中没有super.selectItem
那么s:Datagrid
如何在spark datagrid上启用控制键?