0

What would be the best way to go about this - need context menu items only on certain columns (locked columns) of a datagird and not on the other columns.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Tintin
  • 2,853
  • 6
  • 42
  • 74

1 Answers1

0

got it working by including this in code:

_context.addEventListener(ContextMenuEvent.MENU_SELECT, onMenuSelect);//_context is the dataprovider of the contextMenu of the datagird

then inside onMenuSelect

checking the condition like this:

var obj:Object=event.mouseTarget;
if (obj.listData.columnIndex < 10)//where 10 is the locked columns index of the datagrid
{
}

Thanks.

Tintin
  • 2,853
  • 6
  • 42
  • 74