Hello Dharmendra, I have done this type of functionality in Flex 2. That functionality was like :: User can select multiple rows on a single click without pressing SHIFT key and when user again click on the selected row it gets deselected. for that functionality I have not override any method. I have just created a method & Array as you have done and stored the index of selected row at the respective index of array. thereafter asigned that array to DG's selectedIndices.
Cheers.... Sanjay Sharma --- In flexcoders@yahoogroups.com, "Dharmendra Chauhan" <chauhan_i...@...> wrote: > > Hello, > I have designed a custom dataGird which allows user to select > multiple row without shift key. that meas user just need to right > click the mouse and drag it over the grid. For this I have > override mouseOverHandler Function in my dataGrid. > > override protected function mouseOverHandler(event:MouseEvent):void > { > var selectedArr:Array = new Array(); > if(isMouseDown){ > > try{ > > selectedArr = dg.selectedIndices; > > > selectedArr.push(mOver.target.listData.rowIndex); > > > dg.selectedIndices = selectedArr; > > > }catch(e:Error){ > } > } > } > > Issue wich I have been facing is 'mOver.target.listData.rowIndex' > does not consistently return rowIndex ,whenever I move mouse with > fast pace > 1 ) it throws an error " Property listData not found on > mx.controls.listClasses.ListBaseContentHolder > and there is no default value" . > 2) Some dataGrid does not dispatch mouseOver as a result > mouseUpHandler does get called. > I hope you are convinced with observation.Please let me know you > have any workAound for the above issue. > > Regards, > Dharmendra >