hi,
I am using pivot Grid in our application. Is it possible to set custom width per each column for pivot grid?
for now i use
gridOptions : {
defaultColumnWidth: 80}
but i need to set different width for different columns
Hi Martin,
Is there a way/property to set pivoitgrid column width to it's column head size automatically?
Hello,
You can manipulate the grid column collection in the dataRendering event. Here is a code snippet.
$("#pivotGrid").on("iggriddatarendering", function (evt, ui) {
// return if the column collection is not generated yet
if (ui.owner.options.columns && ui.owner.options.columns.length === 0) {
return;
}
ui.owner.options.columns[0].width = "50px";
});
Please note that since the data is dynamic there is no good way that you identify what data is in the column.I'm attaching a working sample. You can see that when expanding "All Sellers" the "Stanley Brooker" column is with width "50px".
Best regards,Martin PavlovInfragistics, Inc.