You can implement a MlGridListener interface to receive events from an MlGrid.
The MlGridListener interface is:
public interface MlGridListener extends EventListener
{
void onGridEvent(MlGridEvent event);
}
You can call the addMlGridListener() method on the target MlGrid to receive events, as the following example shows:
public MyClass extends BaseClass implements MlGridListener
{
void init()
{
...
grid.addMlGridListener(this);
}
public void onGridEvent(MlGridEvent event)
{
if (event ...)
}
}
public void onGridEvent(MlGridEvent event)
This method is called for various Grid events including selection,
deselection, focus changes, etc. The various types of events received
are described in the MlGridEvent reference page.