Hi Parjan,
You can give the illusion that the DataGrid is not selectable by
extending DataGrid and overriding the drawSelectionIndicator function
(selectable="true").
package com.controls
{
import mx.controls.DataGrid;
import flash.display.Sprite;
import mx.controls.listClasses.IListItemRenderer;
public class MyDataGrid extends DataGrid
{
public function MyDataGrid()
{
super();
}
override protected function drawSelectionIndicator(
indicator:Sprite,
x:Number, y:Number,
width:Number,
height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{
/* don't call super and don't draw the selection indicator */
}
}
}
Another hack would be to set the selectedIndex to -1 on the DataGrid
change event.
-TH
--- In [email protected], Parjan Arjan <[EMAIL PROTECTED]> wrote:
>
> Hi every one , i am facing a little problem please help me.
> I have DataGrid with following styles
> alternatingItemColors: #FFFFFF, #ECF1F7
> selectionColor: #D9DE74
> roll-over-color:#D3E0FE
> Now on of my grid need the follwing requirement
> Allow hover color only but user cannot select any row ,i tried to set
grid selectable property false but this removes hovering also .
> Can any any tell me how to resolve this problem ,
>
> Thanks in Advance.
>