Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ravi raman on Nov 13, 2007 08:37
open dhtmlx forum
onclick event ion grid

hi ,
how do i add onclick event in particular column,column has int value so sorting also should be taken care off.
Answer posted on Nov 14, 2007 01:46
If you want to handle click on gird header for specific column


grid.attachEvent("onHeaderClick",function(ind){
    if (ind ==INDEX){
       // do anything here
    }
    return true;
})


If you need to handle click on any data cell


grid.setOnRowSelectHandler(function(id,ind){
    if (ind ==INDEX){
       // do anything here
    }
    return true;
},true)