problem about attack an event on a component in a form..

Hello,
I have a problem about an Event,
this is my situation:

I have a “window” with inside in its body a “form” with inside a “tabbar” with inside a its tab a “datatable”.

How I can attack an ‘onItemClick’ event on the datatable?

I have tried this under the datatable but the event doesn’t work:

$$(‘datatable’).attachEvent(‘onItemClick’, function () {

});

Thanks, Warm Regards,
Daniele

It works fine for me. Maybe I misunderstood you, though.

Snippet#6352016b

It works thanks!

I have another question:
is possible make some datatable cells unselectable if its value is empty?

Thanks, regards

onBeforeSelect event can help

http://docs.webix.com/api__selectionmodel_onbeforeselect_event.html

You can return false when clicked cell is empty, it will prevent selection.