Flex: DataGrid使用ListEvent.ITEM_DOUBLE_CLICK监听双击事件

Categories: Flex; Tagged with: ; @ January 31st, 2010 16:48

之前没怎么注意, 一直用MouseEvent.DOUBLE_CLICK来监听DataGrid的双击事件. 但这样会造成即使在空行双击也会激发响应.

		datagridClasses.doubleClickEnabled = true;
		datagridClasses.addEventListener(MouseEvent.DOUBLE_CLICK, onDGDoubleClicked);

正确方法应该使用ListEvent.ITEM_DOUBLE_CLICK监听项目双击事件.

		datagridClasses.addEventListener(ListEvent.ITEM_DOUBLE_CLICK, onDGDoubleClicked);



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.