2 Replies Latest reply: Jun 11, 2010 10:33 AM by mxvx RSS

    Hand Cursor in Datagrid




      I would want to show a handcursor in a datagrid whenever the mouse hovers a row in the datagrid.


      The existing useHandCursor = true and buttonmode  = true doesn't seem to be working


      Whenever I scroll through the rows, the selected row colour is getting changed but the hand cursor is not coming.


      Any solutions?





      Sample code to check

      <?xml version="1.0" encoding="utf-8"?>




      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">



      <mx:ArrayCollection id="arr1" >






      <mx:col1> test1 </mx:col1>



      <mx:col2> price1 </mx:col2>



      <mx:col3> album1 </mx:col3>









      <mx:col1> test2 </mx:col1>



      <mx:col2> price2 </mx:col2>



      <mx:col3> album2 </mx:col3>






      <mx:DataGrid x="23" y="10" dataProvider="{arr1}" useHandCursor="true" buttonMode="true" >




      <mx:DataGridColumn headerText="Column 1" dataField="col1"/>


      <mx:DataGridColumn headerText="Column 2" dataField="col2"/>


      <mx:DataGridColumn headerText="Column 3" dataField="col3"/>







        • 1. Re: Hand Cursor in Datagrid
          BhaskerChari Community Member

          Hi mxvx,


          You can get the handcursor by adding the property mouseChildren="false" along with the properties useHandCursor = "true" and buttonmode  = "true"



          But here the problem is you cannot see the selected row colour is getting changed when you scroll through the rows, but you can see the handCursor for all the rows.


          Actually the handSymbol is also appearing for the code you used...but its not appearing fully means its only appearing when you place the mouse in between the two rows ...try to put the mouseOver the bottom of the first row and check it you can see the handSymbol appearing...



          If this post answers your question or helps, please kindly mark it as such.


          Bhasker Chari

          • 2. Re: Hand Cursor in Datagrid
            mxvx Community Member

            Hi Bhasker,


            As you said, the hand cursor is appearing between rows but my requirement is to get the hand cursor when I mouseOver  the row.

            When we set the mousechildren property to true, it will set the handcursor to the overall datagird.

            If you point to the empty rows or to the datagridheader, it would show the hand cursor but I need that to be dispalyed only when it hovers the rows.