Hi Boyan,
I managed to figure out why the test() is not being called (need to put test() function outside of the $( document ).ready() in order to work). Now, I want to test() to capture the row, column and dataItem only when the search image is clicked. The following script defeat the purpose once the test() is called. How can to achieve did task?
function test(arg) {
var xgrid = $("#grid").data("kendoGrid");
//once triggered this will called whenever a cell in grid is clicked. how to overcome this issue?
$(xgrid.tbody).on("click", "td", function (e) {
var row = $(this).closest("tr");
var curRowIdx = $("tr", xgrid.tbody).index(row);
var colIdx = $("td", row).index(this);
var item = xgrid.dataItem(row);
alert("Hello, " + item.id);
});
}
TIA,
Steve