I have loaded a spreadsheet using the code below. Ideally below each column name (being a letter), I want to add a <select> dropdown. The idea being that the user can select a column field name for each column.
This can either be in the existing header cell or a new one below it. I can't seem to find a column header render which would work as I could set this in the "columnTemplate"
var grid = $( "<div>", {
"id" : (function(){ return "pqgrid"+$(".pq-grid").length; })
})
.appendTo( dlg )
.pqGrid({
autoAddRow: true,
autoAddCol: true,
autoRow: true, // Calc height of every row
dataModel: {data: []},
colModel : [],
numberCell: {width: 40}, // The left number cell index column off
animModel: {on: true, duration: 190}, // Turn on animation
stripeRows: false,
menuIcon: false,
//scrollModel:{autoFit:true}, // show scroll
flex: {all:false}, // Width of headers auto fit
fillHandle: "all", // The small square in bottom right of selection for bulk fill
width: "100%",
height: 400,
// DISPLAY
skipSSFn : true, // Turn off spread sheet functions (speed increase)
hoverMode: "cell", // on hover change color effect
dragColumns: {enabled:false},
showTitle: false,
showToolbar: false,
showTop: false, // Hide top (including col move icons)
wrap: false, // Cell content on one line
hwrap: false, // header content on one line
collapsible: { on: false },
sortModel: {on: false},
sortable: false,
filterModel: { on: false },
editor: {
style: { width: 'auto' },
select: true
},
columnTemplate: {
filter: {
crules: [{ condition: 'range' }]
},
title: function (ui) {
return pq.toLetter(ui.colIndx);
}
},
editModel: {
addDisableCls: true,
//onSave: "downFocus"
}
});