Change dataview item css

Hi,
i am using the example of menu restaurant application.
1).
I want the menu to be unselectable when when dataitem has a certain value that comes from xml.
i am trying to do the following:

$$(“menu”).attachEvent(“onbeforeselect”,function(id){
var data = this.item(id);

                            if(data.Active!=1)
                            {
                            alert(data.Active);
                            this.item(id).detachEvent("onclick");
                            }
		});

i don’t know what is the method that detach the onclick event of the item,becouse it gives me an error:
Object # has no method ‘detachEvent’.

2).
The second problem i have is regarding onXLE event.
I want to show another css of items of the dataview that have one ceratin value.

Thanks in advance

If the onBeforeSelect event handler returns false, an item won’t be selected. For example:

$$(“menu”).attachEvent(“onBeforeSelect”,function(id){
return this.item(id).Active==1
});

I want to show another css of items of the dataview that have one ceratin value.

You may change the template - use a function as the template. The function should return different html strings depeneding of the value:

docs.dhtmlx.com/touch/doku.php?i … #js_method