Gridlayout on property doesn't work

How can I get gridlayout on property ?

   webix.ui({                        
        container:"container3",
        id: "grid",
        view:"gridlayout",
        gridColumns:30, 
        gridRows:20,
        cellHeight: 25,
        cellWidth: 25,
        on:{
            onItemClick: function(id){ 
            alert("You have clicked on an item with id="+id); 
            }
        },            
        cells:[
            { id:"fila1.001", css:"boxy indisponivel", template:"001", x:1, y:1, dx:1, dy:1 },
            { id:"fila1.002", css:"boxy indisponivel", template:"002", x:2, y:1, dx:1, dy:1 },
            { id:"fila1.003", css:"boxy indisponivel", template:"003", x:3, y:1, dx:1, dy:1 },

Hello @ngchagas,

Gridlayout’s ‘on’ property works as expected. Your example has one mistake: gridlayout doesn’t have onItemClick() event. Full list of gridlayout’s events you can find here.

Solution for ‘click’ event you can find here: Grid layout onclick - #2 by NatashaS

Thanks Natasha, you nailed it. :slight_smile:

1 Like