tpang, you can highlight a particular cell by doing this:
1. Turn off all highlighting, like mouse over and mouse click. You can find how to
do this with google.
2. Listen for a mouse click event on a DataGrid.
3. Find the row and column value selected.
4. Look at DataGrid's listItems protected Array, which holds current item renderers.
Retrieve the item renderer using the row and column values from previous step,
and set the item renderer's opaqueBackground value to whatever you want the
highlight color to be.
This is not the most reusable solution, because it only works for DataGridItemRenderer item renderer.
Pratap, I would probably create my own itemRenderer,and listen for mouse click events, using which you'd draw a border around the item renderer. The only problem is getting the item renderer's width and height values. You can try using the item renderer's width and height values, but I don't that will work either. Try experimenting with different measurement values that are available.
|