Author Topic: How do I trigger an event when the checkbox select is Un/checked in the pqgrid?  (Read 4219 times)

iamgsprabhu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Hi.

I have a grid with type as select, and I want to hide a column on another grid.  I saw the example on (http://paramquery.com/demos/showhide_columns). I want to implement something similar, but instead of menu, I will have the checkbox on a grid ?  I tried the event rowSelect, rowUnselect, cellSelect and cellUnselect, but all four does not trigger the event.

Kindly advise, how can I trigger an event when the checkbox is selected or unselected ?

thx
Prabhu

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Try cellClick event:

Code: [Select]
cellClick: function(evt, ui){

if(ui.column.type == 'checkBoxSelection'){
alert("rowIndx = " + ui.rowIndx + ", value = "+ui.rowData.state );
}
},

iamgsprabhu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Perfect, it worked for me.

thx
Prabhu