I have a basic grid setup as below, however I want to be able to select the text in the "code" column so that CTRL+C can be pressed to copy it. Is that possible? Notice it is select row and there are check boxes.
.pqGrid({
dataModel: {data: []},
colModel : [
{dataIndx:"state", maxWidth:30, minWidth:30, align:"center", resizable:false, title:"", menuIcon:false, type:"checkBoxSelection", cls:"ui-state-default", sortable:false, editor:false, dataType:'bool',
cb: {
all: true, // Checkbox selection in the header affect current page only.
header: true // Show checkbox in header.
}
},
{dataIndx:'qty', maxWidth:80, dataType:"float", editable:false},
{dataIndx:'code', maxWidth:100, editable:false},
{dataIndx:'something', maxWidth:150, editable:false}
],
numberCell: {show: false},
menuIcon: false,
scrollModel:{autoFit:true}, // show scroll
flex: {on:true}, // Width of headers auto fit
width: "100%",
height: "100%",
hoverMode: "row",
dragColumns: {enabled:false},
showTitle: false,
showToolbar: false,
showTop: false,
wrap: true, // Cell content on one line
hwrap: false,
selectionModel: { type:"row", mode:"single", column:false, all:false}, // Select rows !!!!
virtualWin: true,
rowClick: function(event, ui) {
// Must be a data row
if(!empty(ui.rowData))
{
// It will be true, false or undefined
var checked = ui.rowData["state"];
// Edit the row and toggle the state (checkbox)
that.infoGrid.pqGrid("updateRow", {rowIndx:ui.rowIndx, newRow:{"state":!checked} });
}
},
check: function(event, ui) {
that.change_info_grid_checked();
},
groupModel: {
on: true,
header: false,
grandSummary: true,
agg: {
qty: 'sum'
}
},
summaryTitle:{ count: "{0}", sum: "{0}" ,avg:"{0}" }
});