Author Topic: cellClick event  (Read 1142 times)

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
cellClick event
« on: December 17, 2019, 03:08:29 pm »
hi
i tried to establish a cellClick eventhandler but no success at first.
Played with the Demos, here my results:
   $(function () {
        var data = [
            { rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 },
   ....
            { rank: 2, company: 'Wal-Mart Stores', revenues: 315654.0, profits: 11231.0 },
            { rank: 19, company: 'Crédit Agricole', revenues: 110764.6, profits: 7434.3 },
            { rank: 20, company: 'American Intl. Group', revenues: 108905.0, profits: 10477.0 }
        ];

        var obj = {
            width: "80%",
            height: 400,
            resizable: true,
            title: "Grid From JSON",
            showBottom: false,
            scrollModel: { autoFit: true },
            dataModel: { data: data }
   //,cellClick:function(event,ui){console.log(ui)}  //works
        };
        $("#grid_json").pqGrid(obj);
   $("#grid_json").pqGrid("option",{cellClick:function( event, ui ) {console.log(ui)} }) //works
   //$("#grid_json").on( "pqGrid:cellClick", function( event, ui ) {console.log(ui)} ); //does not work
   
    });   
   

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5240
    • View Profile
Re: cellClick event
« Reply #1 on: December 17, 2019, 09:13:03 pm »
[ Only Pro members may read this post. ]