ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: SureshB on July 03, 2015, 03:47:54 pm

Title: Manual Height of the rows
Post by: SureshB on July 03, 2015, 03:47:54 pm
Hi ,

Can we provide height of the rows in the grid manually?

thank you.
Title: Re: Manual Height of the rows
Post by: paramvir on July 03, 2015, 05:52:08 pm
It can't be set directly because table cells expand in height based on their content.

Setting min-height is easy. It can be done thorugh JSON format or attr() method.

{ dataIndx, value1, ... pq_rowattr: { style: 'min-height:50px;' } }

attr({
  rowData, rowData,
  attr: { style: 'min-height:50px;'  }
})

max-height can be set by wrapping the cell contents in a div and setting max-height on that div. It can be done at once in columnTemplate or individual columns.

columnTemplate: {render: function(ui){
    var rowData = ui.rowData;
    //set max-height based on rowData or a fixed value.
    return "<div style='max-height:50px;overflow:auto;'>"+ui.cellData +"</div>";
}},