<?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
// 株式会社　アイエルエス
// Copyright 2008 ILS
// All Rights Reserved.
//
// NOTICE:  
////////////////////////////////////////////////////////////////////////////////
-->
<IlsDataGrid xmlns="cls.com.ils.common.component.*" xmlns:mx="http://www.adobe.com/2006/mxml"
	doubleClickEnabled="true"
	itemDoubleClick="onItemDoubleClick()"
	keyDown="onKeyDown(event)"
	>	
	<mx:Script>
		<![CDATA[
		    //----------------------------------
		    //  selRowFunction
		    //----------------------------------
		
		    /**
		     *  @private
		     *  Storage for the selRowFunction property.
		     */
		    private var _selRowFunction:Function;
		
		    [Bindable("selRowFunctionChanged")]
		    [Inspectable(category="General")]
		    
		    /**
		     *  @inheritDoc
		     *
		     *  @see #refresh()
		     */
		    public function get selRowFunction():Function
		    {
		        return _selRowFunction;
		    }
		
		    /**
		     *  @private
		     */
		    public function set selRowFunction(f:Function):void
		    {
		        _selRowFunction = f;
		        dispatchEvent(new Event("selRowFunctionChanged"));
		    }

		    /**
		     *  @private
		     */
		    private function onKeyDown(event:KeyboardEvent):void
		    {
	            if (selRowFunction != null)
	            {
		            //Enterキーに対するイベントの場合
		            if(event.keyCode == Keyboard.ENTER && !event.shiftKey)
		            {
		            	//選択処理
		                selRowFunction();
		            }
	            }	
		    }
		    
		    private function onItemDoubleClick():void
		    {
	            if (selRowFunction != null)
	            {
	            	//選択処理
	                selRowFunction();
	            }	
		    }
			
		]]>
	</mx:Script>
</IlsDataGrid>
