Friday, November 27, 2015

Get a grid's cell position in jQWidgets

Get a grid's cell position in jQWidgets

$('#jqxgrid').jqxGrid({
  ready: function(){
    $('#jqxgrid').on('cellclick', function (event) {
      console.log(event.args.originalEvent.clientX);
      console.log(event.args.originalEvent.clientY);

      console.log($('#jqxgrid').offset());
      console.log($('#jqxgrid').width());
      console.log($('#jqxgrid').height());

      if (event.args.rightclick) {
        console.log('right clicked');
      }
    });
  },
});

No comments: