ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: larksys on May 01, 2015, 07:25:06 am

Title: Need simple cell click to return cell value
Post by: larksys on May 01, 2015, 07:25:06 am
I guess I just don't understand.  How can I get the value of the cell that is clicked?

$("#userslistdiv").pqGrid({
            width: 560, height: 470, title: "Select Participant", dataModel: dataModel, colModel: colM, scrollModel: {horizontal: false   },
            flexHeight: true, selectionModel: { type: 'cell'},
            selectionModel: { type: 'cell', mode: 'block' }
         });
Title: Re: Need simple cell click to return cell value
Post by: paramvir on May 04, 2015, 03:51:01 pm
you would use cellClick event to get cell value of the clicked cell.

Code: [Select]
cellClick: function(evt, ui){
       var $td = $(evt.currentTarget).closest("td");
       alert($td.text());
}

http://jsfiddle.net/bphnecvm/129/
Title: Re: Need simple cell click to return cell value
Post by: larksys on May 06, 2015, 06:25:39 am
Thank you very much.  PQgrid is starting to make sense.